X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/872f3df9586c901552dc51fc835a5afe12db6c66..05c560470887c86a30c82360d7be5caf0de1baa4:/edit/head.inc.php diff --git a/edit/head.inc.php b/edit/head.inc.php index 9759ec8..b2b50f3 100644 --- a/edit/head.inc.php +++ b/edit/head.inc.php @@ -1,4 +1,8 @@ file) and !is_writable($Page->file)) { + return; +} + if (!isset($Page->raw)) { # open bottom template as initial contents $template = 'template.inc.html'; @@ -11,19 +15,6 @@ if (!isset($Page->raw)) { $Page->body = NULL; } -$editpage = $Page->link; -if (is_dir($editpage)) { - if (file_exists("$editpage/index.html")) { - $editpage .= '/index.html'; - } -} -else { - $editpage .= '.html'; -} -if (file_exists($editpage) and !is_writable($editpage)) { - return; -} - if (isset($Page->raw)) { # restore meta tags in static contents for editing foreach (array_reverse($Page->meta) as $metaprop => $val) { @@ -34,12 +25,14 @@ if (isset($Page->raw)) { } } +ob_start(); +if ($csssrc = '/admin.css' and file_exists(DOCROOT . $csssrc)) { + printf(''."\n", $csssrc); +} $ckesrc = '/lib/ckeditor'; # local install if (!file_exists(DOCROOT . $ckesrc)) { $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback } -ob_start(); -printf("\n", "$ckesrc/ckeditor.js"); -print ''."\n"; +printf(''."\n", "$ckesrc/ckeditor.js"); $Page->head = ob_get_clean();