aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerhome.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-10 15:28:56 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-10 15:28:56 +0100
commitd9816ef4affa3d7096a2189e9b171d9d130a727e (patch)
tree346e26956d0a7521a3736bc85beea397a24d1c46 /app/class/Controllerhome.php
parent7001272f4e8b683cbc64564c5798d85a34ab9026 (diff)
downloadwcms-d9816ef4affa3d7096a2189e9b171d9d130a727e.tar.gz
wcms-d9816ef4affa3d7096a2189e9b171d9d130a727e.zip
new feature : multi edit base working
Diffstat (limited to 'app/class/Controllerhome.php')
-rw-r--r--app/class/Controllerhome.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php
index 003a325..bb22e57 100644
--- a/app/class/Controllerhome.php
+++ b/app/class/Controllerhome.php
@@ -6,6 +6,7 @@ class Controllerhome extends Controllerpage
{
/** @var Modelhome */
protected $modelhome;
+ /** @var Opt */
protected $opt;
/** @var Optlist */
protected $optlist;
@@ -125,6 +126,19 @@ class Controllerhome extends Controllerpage
}
$this->routedirect('home');
}
+
+ public function multiedit()
+ {
+ if ($this->user->issupereditor() && isset($_POST['pagesid'])) {
+ $datas = $_POST['datas'] ?? [];
+ $reset = $_POST['reset'] ?? [];
+ $addtag = $_POST['addtag'] ?? [];
+ foreach ($_POST['pagesid'] as $id) {
+ $this->pagemanager->pageedit($id, $datas, $reset, $addtag);
+ }
+ }
+ $this->routedirect('home');
+ }
}
?>