X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/50f9b29cc21f5adef555d3cf21940124ceadb0eb..9c6f7860bd137aff83ad9038839089c150974ea3:/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 "