aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerpage.php
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2020-12-19 19:52:59 +0100
committern-peugnet <n.peugnet@free.fr>2020-12-19 19:52:59 +0100
commitd2bbcab233dabe3b04f8c3b94a947ec174540418 (patch)
tree8ed06c1b412cc20f899686738a49bef6b1ead7d8 /app/class/Controllerpage.php
parent9338d030f38b465be5f6307f5ee6f2e20d904856 (diff)
downloadwcms-d2bbcab233dabe3b04f8c3b94a947ec174540418.tar.gz
wcms-d2bbcab233dabe3b04f8c3b94a947ec174540418.zip
run phpcbf and add fix target to Makefile
Diffstat (limited to 'app/class/Controllerpage.php')
-rw-r--r--app/class/Controllerpage.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php
index 2e1c285..0bb99a9 100644
--- a/app/class/Controllerpage.php
+++ b/app/class/Controllerpage.php
@@ -104,7 +104,7 @@ class Controllerpage extends Controller
$renderengine->render($page);
$page->setdaterender($now);
$page->setlinkto($renderengine->linkto());
-
+
return $page;
}
@@ -269,7 +269,7 @@ class Controllerpage extends Controller
{
if ($this->user->isadmin()) {
$file = Model::PAGES_DIR . Config::pagetable() . DIRECTORY_SEPARATOR . $id . '.json';
-
+
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/json; charset=utf-8');
@@ -297,17 +297,17 @@ class Controllerpage extends Controller
if (!empty($_POST['id'])) {
$page->setid(idclean($_POST['id']));
}
-
+
if ($_POST['datecreation']) {
$page->setdatecreation($this->now);
}
-
+
if ($_POST['author']) {
$page->setauthors([$this->user->id()]);
}
-
+
$page->setdaterender($page->datecreation('date'));
-
+
if ($_POST['erase'] || $this->pagemanager->get($page) === false) {
if ($this->pagemanager->add($page)) {
Model::sendflashmessage('Page successfully uploaded', 'success');
@@ -401,7 +401,7 @@ class Controllerpage extends Controller
$this->pagemanager->update($this->page);
-
+
//$this->showtemplate('updatemerge', $compare);
} else {
// If the editor session finished during the editing, let's try to reconnect to save the editing
@@ -426,7 +426,7 @@ class Controllerpage extends Controller
Config::savejson();
}
}
-
+
public function pagedirect($id)
{
$this->routedirect('pageread/', ['page' => idclean($id)]);