git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nieuws: include admin edit javascript on subpages
[minimedit.git]
/
nieuws
/
index.php
diff --git
a/nieuws/index.php
b/nieuws/index.php
index 73973574629bce60a06b8eb8a640cf37a39d43ad..1a520112da6663f1805f602829469f6c65a1ee99 100644
(file)
--- a/
nieuws/index.php
+++ b/
nieuws/index.php
@@
-4,6
+4,10
@@
include 'nieuws.inc.php';
$replyform = $Page == 'melding' && !empty($User);
@list ($year, $page) = explode('/', trim($Args, '/'));
$replyform = $Page == 'melding' && !empty($User);
@list ($year, $page) = explode('/', trim($Args, '/'));
+if (!empty($User['admin'])) {
+ print '<script src="/nieuws/edit.js"></script>'."\n";
+}
+
if ($page and !is_numeric($page)) {
$edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL;
$article = new ArchiveArticle("$Page$Args.html");
if ($page and !is_numeric($page)) {
$edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL;
$article = new ArchiveArticle("$Page$Args.html");
@@
-62,7
+66,3
@@
if ($year) {
print placeholder_include('nieuws', [$match]);
return 1;
}
print placeholder_include('nieuws', [$match]);
return 1;
}
-
-if (!empty($User['admin'])) {
- print '<script src="/nieuws/edit.js"></script>'."\n";
-}