aboutsummaryrefslogtreecommitdiff
path: root/public/w/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/w/index.php')
-rw-r--r--public/w/index.php36
1 files changed, 35 insertions, 1 deletions
diff --git a/public/w/index.php b/public/w/index.php
index 1f3e967..887cc9a 100644
--- a/public/w/index.php
+++ b/public/w/index.php
@@ -118,8 +118,42 @@ if (isset($_POST['action'])) {
case 'update':
if ($app->exist($_GET['id'])) {
$art = new Art($_POST);
+ $art->updatelien();
+ $art->autotaglistcalc($app->taglist($app->getlister(['id', 'titre', 'tag']), $art->autotaglist()));
$app->update($art);
- header('Location: ?id=' . $art->id() . '&edit=1');
+ if($config->fontsize() != $_POST['fontsize']) {
+ $config->setfontsize($_POST['fontsize']);
+ $app->savejson($config->tojson());
+ }
+ header('Location: ?id=' . $art->id() . '&edit=1&message='.$art->id().'_saved');
+ }
+ break;
+
+ case 'display':
+ if ($app->exist($_GET['id'])) {
+ $art = new Art($_POST);
+ $art->updatelien();
+ $art->autotaglistcalc($app->taglist($app->getlister(['id', 'titre', 'tag']), $art->autotaglist()));
+ $app->update($art);
+ if($config->fontsize() != $_POST['fontsize']) {
+ $config->setfontsize($_POST['fontsize']);
+ $app->savejson($config->tojson());
+ }
+ header('Location: ?id=' . $art->id().'&message='.$art->id().'_saved');
+ }
+ break;
+
+ case 'home':
+ if ($app->exist($_GET['id'])) {
+ $art = new Art($_POST);
+ $art->updatelien();
+ $art->autotaglistcalc($app->taglist($app->getlister(['id', 'titre', 'tag']), $art->autotaglist()));
+ $app->update($art);
+ if($config->fontsize() != $_POST['fontsize']) {
+ $config->setfontsize($_POST['fontsize']);
+ $app->savejson($config->tojson());
+ }
+ header('Location: ./?message='.$art->id().'_saved');
}
break;