diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-10-04 05:10:51 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-10-04 05:10:51 +0200 |
commit | 67b20c49ec4e5efb4526fc64ef679dfb6dd41e30 (patch) | |
tree | 289a6da21e036b62c881bc505a079d5d64dc1c20 /public/w | |
parent | c3c4be4a4efd1404aad19797c15d2a9a6ffe29a6 (diff) | |
download | wcms-67b20c49ec4e5efb4526fc64ef679dfb6dd41e30.tar.gz wcms-67b20c49ec4e5efb4526fc64ef679dfb6dd41e30.zip |
2.8 auto-tag-update + help + tabs
Diffstat (limited to 'public/w')
-rw-r--r-- | public/w/article.php | 9 | ||||
-rw-r--r-- | public/w/index.php | 36 |
2 files changed, 42 insertions, 3 deletions
diff --git a/public/w/article.php b/public/w/article.php index e5cfff7..307caa4 100644 --- a/public/w/article.php +++ b/public/w/article.php @@ -6,12 +6,17 @@ if ($app->exist($_GET['id'])) { if (isset($_GET['edit']) and $_GET['edit'] == 1 and $app->session() >= $app::EDITOR) { echo '<section class=edit>'; - $aff->edit($art, $app, $app->getlister(['id', 'titre'])); - $aff->copy($art, $app->getlister(['id', 'titre'])); + $aff->edit($art, $app, $app->getlister(['id', 'titre']), $config->fontsize(), $app->getlistermedia($app::MEDIA_DIR, 'image')); + //$aff->copy($art, $app->getlister(['id', 'titre'])); $aff->aside($app); echo '</section>'; } else { echo '<section class="lecture">'; + + + $art->autotaglistupdate($app->taglist($app->getlister(['id', 'titre', 'intro', 'tag']), $art->autotaglist())); + + $aff->lecture($art, $app); echo '</section>'; 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; |