git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d092b63
)
page: global var to indicate edit mode
v2.0
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 12 Sep 2017 00:40:41 +0000
(
02:40
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000
(20:21 +0200)
foot.inc.php
patch
|
blob
|
history
page.php
patch
|
blob
|
history
diff --git
a/foot.inc.php
b/foot.inc.php
index e3e36b6f183b07e9f3c5c7bbb752205af56d7d85..a7f52d692a1c5930d86724bfdbb6e6ee09a240a1 100755
(executable)
--- a/
foot.inc.php
+++ b/
foot.inc.php
@@
-2,13
+2,12
@@
<?php
define('N', "\n");
<?php
define('N', "\n");
-global $Page, $User, $Admin;
+global $Page, $User, $Admin
, $Edit
;
if ($Admin) {
if ($Admin) {
- $edit = preg_match('/[?]edit$/', $_SERVER['REQUEST_URI']);
$notfound = $Page == '404';
$notfound = $Page == '404';
- if ($
e
dit) {
+ if ($
E
dit) {
echo '<script src="/ckeditor/ckeditor.js"></script>'.N;
echo '<script src="/edit.js"></script>'.N;
if ($notfound) {
echo '<script src="/ckeditor/ckeditor.js"></script>'.N;
echo '<script src="/edit.js"></script>'.N;
if ($notfound) {
@@
-24,8
+23,8
@@
EOT;
echo '<p class="footer">'.N;
echo "Beheer toegestaan voor $User:".N;
printf('<a href="?%s">%s</a>'.N,
echo '<p class="footer">'.N;
echo "Beheer toegestaan voor $User:".N;
printf('<a href="?%s">%s</a>'.N,
- $
e
dit ? '' : 'edit',
- $
e
dit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen')
+ $
E
dit ? '' : 'edit',
+ $
E
dit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen')
);
echo '</p>'.N;
}
);
echo '</p>'.N;
}
diff --git
a/page.php
b/page.php
index 5d79cf6846ff9e740bf675f5928773fe25e15f45..e2043edb4b4cd6ed3a30805f76637f9b213693e4 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-29,4
+29,6
@@
while (TRUE) {
$Page = substr($Page, 0, $up);
}
$Page = substr($Page, 0, $up);
}
+$Edit = isset($_GET['edit']);
+
include 'head.inc.php';
include 'head.inc.php';