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
(parent:
73246f5
)
page: provide abort function from edit
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 25 Apr 2018 12:02:25 +0000
(14:02 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 8 Jun 2018 15:56:31 +0000
(17:56 +0200)
Move to allow reuse on other pages.
edit.php
patch
|
blob
|
history
page.php
patch
|
blob
|
history
diff --git
a/edit.php
b/edit.php
index 8f3abc5b1cf7665eb9f64b8431540a0c2a63c70b..25f9f1be5454506c137cdc85a698357380810159 100644
(file)
--- a/
edit.php
+++ b/
edit.php
@@
-1,12
+1,6
@@
<?php
ob_clean();
-function abort($body, $status = NULL) {
- if ($status) header("HTTP/1.1 $status");
- print "$body\n";
- exit;
-}
-
if (empty($User['admin']))
abort("geen beheersrechten", '401 unauthorised');
diff --git
a/page.php
b/page.php
index 1f86e5b2c63fbff6d08a42be713ffba1491d028b..76a99b5b8aa5ede7689faa37d1e0f68b895b816e 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-2,6
+2,12
@@
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
+function abort($body, $status = NULL) {
+ if ($status) header("HTTP/1.1 $status");
+ print "$body\n";
+ exit;
+}
+
function getoutput($blocks = [])
{
$rep = [];