git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edit/page: input replacement of breaking space after abbreviations
[minimedit.git]
/
page.inc.php
diff --git
a/page.inc.php
b/page.inc.php
index 8298c6d4482ca806b747380433696f0634334cbf..c21b4e7b9f45dfcef645e9839dc375b417864370 100644
(file)
--- a/
page.inc.php
+++ b/
page.inc.php
@@
-5,12
+5,15
@@
include_once 'head.inc.php';
print "<header>\n";
ob_start();
print "<header>\n";
ob_start();
-include 'menu.html';
+include 'menu.
inc.
html';
ob_start();
ob_start();
-if ($User) {
+if ($User
and property_exists($User, 'login') and $User->login
) {
print '<div class="login"><p>';
print '<div class="login"><p>';
- printf('<span>Ingelogd: <b><a href="%s">%s</a></b></span>', '/login', $User->login);
- if ($User->admin) {
+ printf('<span title="ingelogd">%s <a href="%s">%s</a></span>',
+ '<span class="icon icon-user">👤</span>',
+ '/login', $User->login
+ );
+ if ($User->admin("edit $Page$Args")) {
$editpage = $Page.$Args;
if (is_dir($editpage)) {
if (file_exists("$editpage/index.html")) {
$editpage = $Page.$Args;
if (is_dir($editpage)) {
if (file_exists("$editpage/index.html")) {
@@
-21,7
+24,7
@@
if ($User) {
$editpage .= '.html';
}
if (!file_exists($editpage) or is_writable($editpage)) {
$editpage .= '.html';
}
if (!file_exists($editpage) or is_writable($editpage)) {
- print ' <a
href="#edit">Wijzig
</a>';
+ print ' <a
class="icon icon-edit" href="#edit" title="wijzig">✍
</a>';
}
}
print "</p></div>\n";
}
}
print "</p></div>\n";
@@
-40,11
+43,11
@@
print $body;
register_shutdown_function(function () {
print '<footer>';
register_shutdown_function(function () {
print '<footer>';
- @include 'footer.html';
+ @include 'footer.
inc.
html';
print "</footer>\n";
print "</footer>\n";
- global $User;
- if ($User and $User->admin) {
+ global $User
, $Page, $Args
;
+ if ($User and $User->admin
("edit $Page$Args")
) {
$ckesrc = '/lib/ckeditor'; # local install
if (!file_exists(DOCROOT . $ckesrc)) {
$ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback
$ckesrc = '/lib/ckeditor'; # local install
if (!file_exists(DOCROOT . $ckesrc)) {
$ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback