X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/6ce5695197ca6b3137a44d775baff00aaa6e0673..1f8560a20d5d1aa8886688bd7553b8a8fd704fff:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 54a3944..1253338 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,11 +1,11 @@ \n"; ob_start(); -include DOCROOT.'menu.html'; +include 'menu.html'; ob_start(); if (!empty($User)) { print '

'; @@ -20,7 +20,7 @@ if (!empty($User)) { else { $editpage .= '.html'; } - if (is_writable($editpage)) { + if (!file_exists($editpage) or is_writable($editpage)) { print ' Wijzig'; } } @@ -46,13 +46,17 @@ print $body; register_shutdown_function(function () { print '

\n"; global $User; if (!empty($User['admin'])) { - print ''."\n"; - print ''."\n"; + $ckesrc = '/lib/ckeditor'; # local install + if (!file_exists(DOCROOT . $ckesrc)) { + $ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback + } + printf(''."\n", "$ckesrc/ckeditor.js"); + print ''."\n"; } print "\n";