Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/admin/init.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

if ($auth->getUsername() != "admin") {
if (!$auth->isAdmin()) {
header("HTTP/1.1 403 Forbidden");
exit;
}
2 changes: 1 addition & 1 deletion app/admin/views/users.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<tr>
<td><?php echo htmlspecialchars($user->getUsername()); ?></td>
<td>
<?php if ($user->getUsername() != "admin") : ?>
<?php if (!$user->isAdmin()) : ?>
<a href="?mod=admin&amp;a=delete-user&amp;username=<?php echo urlencode($user->getUsername()); ?>">supprimer</a>
<?php else: ?>
-
Expand Down
2 changes: 1 addition & 1 deletion app/default/views/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
<?php if ($userAuthed) : ?>
<footer>
<?php if ($userAuthed->getUsername() == "admin") : ?>
<?php if ($userAuthed->isAdmin()) : ?>
<a href="?mod=admin&amp;a=users" style="color: #EF0000;">Administration</a> |
<?php endif; ?>
Version <?php echo APPLICATION_VERSION; ?>
Expand Down
2 changes: 1 addition & 1 deletion app/install/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
exit;
}

if ($action == "upgrade" && $auth->getUsername() != "admin") {
if ($action == "upgrade" && !$auth->isAdmin()) {
header("HTTP/1.1 403 Forbidden");
exit;
}
2 changes: 1 addition & 1 deletion app/install/scripts/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
exit;
}

if ($auth->getUsername() != "admin") {
if (!$auth->isAdmin()) {
header("HTTP/1.1 403 Forbidden");
exit;
}
Expand Down