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:
61170ad
)
login: avoid php notice on missing user
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 13 Sep 2017 02:04:12 +0000
(
04:04
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000
(20:21 +0200)
edit.php
patch
|
blob
|
history
login.php
patch
|
blob
|
history
diff --git
a/edit.php
b/edit.php
index 01d83dfa64f602dcf71ca38f2049f7f188432058..18563365e7d989357bcc9a514ff24cca259d1571 100755
(executable)
--- a/
edit.php
+++ b/
edit.php
@@
-5,7
+5,7
@@
function abort($status, $body) {
exit;
}
-if (!$User['admin'])
+if (!
@
$User['admin'])
abort('401 unauthorised', "geen beheersrechten");
if (!$_POST)
diff --git
a/login.php
b/login.php
index 042dea94f9ea0c1331c38ff7e9948f0f2c7aef42..369a01358f34276c3eb5dd7e4ec0d02e24c2a396 100644
(file)
--- a/
login.php
+++ b/
login.php
@@
-12,7
+12,7
@@
if (isset($_POST['login'])) {
echo '<p class="warn">Ongeldige gebruikersnaam of wachtwoord.</p>'."\n\n";
}
-elseif (
$User
) {
+elseif (
!empty($User)
) {
setcookie('login', '', time(), '/'); # expire immediately
echo '<p class="warn">Uitgelogd.</p>'."\n\n";
}