From 9090550d241f9f7b3246b24bfd323bd988add749 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 28 Apr 2020 20:18:17 +0200 Subject: listen to brother Stan and clean some things --- app/class/Controllerpage.php | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'app/class/Controllerpage.php') diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php index b5679a9..c7e1f98 100644 --- a/app/class/Controllerpage.php +++ b/app/class/Controllerpage.php @@ -13,8 +13,6 @@ class Controllerpage extends Controller protected $fontmanager; protected $mediamanager; - public const COMBINE = false; - public function __construct($router) { parent::__construct($router); @@ -368,9 +366,6 @@ class Controllerpage extends Controller $oldpage = clone $this->page; $this->page->hydrate($_POST); - if (self::COMBINE && $_POST['thisdatemodif'] === $oldpage->datemodif('string')) { - } - $this->page->updateedited(); $this->page->addauthor($this->user->id()); $this->page->removeeditby($this->user->id()); @@ -389,41 +384,6 @@ class Controllerpage extends Controller $this->routedirect('pageedit', ['page' => $this->page->id()]); } - /** - * This function set the actual editor of the page - * - * @param string $pageid as the page id - */ - public function editby(string $pageid) - { - $this->page = new Page(['id' => $pageid]); - if ($this->importpage($pageid)) { - $this->page->addeditby($this->user->id()); - $this->pagemanager->update($this->page); - echo json_encode(['success' => true]); - } else { - $this->error(400); - } - } - - /** - * This function remove the actual editor of the page - * - * @param string $pageid as the page id - */ - public function removeeditby(string $pageid) - { - $this->page = new Page(['id' => $pageid]); - if ($this->importpage($pageid)) { - $this->page->removeeditby($this->user->id()); - $this->pagemanager->update($this->page); - echo json_encode(['success' => true]); - } else { - $this->error(400); - } - } - - public function movepanels() { $_SESSION['workspace']['showrightpanel'] = isset($_POST['workspace']['showrightpanel']); -- cgit v1.2.3