X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/86c2b19f372b3d7d4556d60586215ccf3d72a6c7..f065f4739ae477d8877805463017f2e7b15e2db5:/page.inc.php diff --git a/page.inc.php b/page.inc.php index ae223f1..78cca99 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,11 +1,12 @@ render(@$Place); include_once 'head.inc.php'; print "
\n"; ob_start(); -include 'menu.inc.html'; +$menu = new ArchiveArticle('menu.inc.html'); +print $menu->raw; ob_start(); if ($User and property_exists($User, 'login') and $User->login) { print '

'; @@ -13,8 +14,8 @@ if ($User and property_exists($User, 'login') and $User->login) { '👤', '/login', $User->login ); - if ($User->admin("edit $Page$Args")) { - $editpage = $Page.$Args; + if ($User->admin("edit {$Page->link}")) { + $editpage = $Page->link; if (is_dir($editpage)) { if (file_exists("$editpage/index.html")) { $editpage .= '/index.html'; @@ -29,7 +30,7 @@ if ($User and property_exists($User, 'login') and $User->login) { } print "

\n"; } -$nav = getoutput(['login' => ob_get_clean()]); +$nav = $menu->render(['login' => ob_get_clean()]); $nav = preg_replace_callback('{(.*?)}', function ($m) { $request = $_SERVER['REQUEST_URI']; @@ -46,11 +47,11 @@ register_shutdown_function(function () { @include 'footer.inc.html'; print "\n"; - global $User, $Page, $Args; - if ($User and $User->admin("edit $Page$Args")) { + global $User, $Page; + if ($User and $User->admin("edit {$Page->link}")) { $ckesrc = '/lib/ckeditor'; # local install if (!file_exists(DOCROOT . $ckesrc)) { - $ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback + $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback } printf("\n", "$ckesrc/ckeditor.js"); print ''."\n";