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: treat years before 2000 as single page
[minimedit.git]
/
edit.php
diff --git
a/edit.php
b/edit.php
index 9ba0d04c02c34d2265851839eedd045cdcbfba95..25f9f1be5454506c137cdc85a698357380810159 100644
(file)
--- a/
edit.php
+++ b/
edit.php
@@
-1,13
+1,7
@@
<?php
ob_clean();
<?php
ob_clean();
-function abort($body, $status = NULL) {
- if ($status) header("HTTP/1.1 $status");
- print "$body\n";
- exit;
-}
-
-if (!@$User['admin'])
+if (empty($User['admin']))
abort("geen beheersrechten", '401 unauthorised');
if ($_FILES) {
abort("geen beheersrechten", '401 unauthorised');
if ($_FILES) {
@@
-54,7
+48,7
@@
if (!strlen($upload)) {
abort("Bestand verwijderd");
}
abort("Bestand verwijderd");
}
-if (!file_exists(dirname($filename)) and !mkdir(dirname($filename)))
+if (!file_exists(dirname($filename)) and !mkdir(dirname($filename)
, 0777, TRUE
))
abort("fout bij aanmaken van map voor $filename", '500 save error');
if (!file_put_contents($filename, $upload))
abort("fout bij aanmaken van map voor $filename", '500 save error');
if (!file_put_contents($filename, $upload))