X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/62b5ff32fa1e2ad7361940351bd6585b9dfcbd9a..88503d06a82643f27d3df1422b07a05a6e1fdeee:/page.inc.php
diff --git a/page.inc.php b/page.inc.php
index 8eba91b..17e7c80 100644
--- a/page.inc.php
+++ b/page.inc.php
@@ -1,4 +1,15 @@
admin("edit {$Page->link}")) {
+ $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";
+ $Page->head = ob_get_clean();
+}
+
include_once 'head.inc.php';
print "\n";
@@ -43,17 +54,6 @@ register_shutdown_function(function () {
print '\n";
-
- 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.15.1/full-all'; # remote fallback
- }
- printf("\n", "$ckesrc/ckeditor.js");
- print ''."\n";
- }
-
print "