login: move admin pages into /login
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 24 Apr 2018 22:27:40 +0000 (00:27 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 25 Apr 2018 01:05:54 +0000 (03:05 +0200)
Permissions should be checked per page, and can make more distinctions than
boolean admin.  Also one dir less to symlink.

login.php
login/admin.html [moved from admin/index.html with 100% similarity]
login/admin.php [moved from admin.php with 87% similarity]
login/commits.html [moved from admin/commits.html with 100% similarity]
login/commits.php [moved from admin/commits.php with 94% similarity]
login/index.html
login/pass.html [moved from admin/pass.html with 100% similarity]
login/pass.php [moved from admin/pass.php with 100% similarity]
login/setmail.php [moved from admin/setmail.php with 100% similarity]
login/visits.html [moved from admin/visits.html with 100% similarity]
login/visits.php [moved from admin/visits.php with 100% similarity]

index 801ba1fd1ce73c17e2384b9ef3efae94c45ae8d6..626281abdcdc977f1f4646f849e7d275ef580a2b 100644 (file)
--- a/login.php
+++ b/login.php
@@ -37,6 +37,6 @@ $part = [
 print getoutput($part);
 
 if (empty($Args) and !empty($User['admin'])) {
-       include_once 'admin/index.html';
-       include_once 'admin.php';
+       include_once 'login/admin.html';
+       include_once 'login/admin.php';
 }
similarity index 100%
rename from admin/index.html
rename to login/admin.html
similarity index 87%
rename from admin.php
rename to login/admin.php
index e73f5b5ca7c78cdc5cb77010b985d89fa630869c..ee6b39feff2c019b6f87f1c49795ddfee8db50e9 100644 (file)
--- a/admin.php
@@ -13,4 +13,4 @@ if (empty($User['admin'])) {
 
 <?php
 $_GET['pagesize'] = 10;
-include_once 'admin/commits.php';
+include_once 'login/commits.php';
similarity index 100%
rename from admin/commits.html
rename to login/commits.html
similarity index 94%
rename from admin/commits.php
rename to login/commits.php
index 2543d79463637ef8a984ffcb721a9b7e67d4c2f8..c411f4704e2e8348110bbcd35d94d83a636a9b57 100644 (file)
@@ -25,7 +25,7 @@ if ( $log = popen($gitcmd, 'r') ) {
        print "</ul>\n\n";
        pclose($log);
 
-       $navbase = $Page == 'admin/commits' ? '?' : '/admin/commits?';
+       $navbase = $Page == 'login/commits' ? '?' : '/login/commits?';
        $nav = [];
        $nav[] = sprintf('Pagina %d', ceil($offset / $pagesize) + 1);
        if ($lines >= $pagesize) {
index 662b3cc20f4385c2b71ed9f4ebd20311bffa7f83..e2fe85e5fd2a0bdd180435e7021c4948a8fe54ff 100644 (file)
@@ -2,6 +2,6 @@
 
 <p>Ingelogd als <em>[[user]]</em>.</p>
 
-<?php include('admin/setmail.php'); ?>
+<?php include('login/setmail.php'); ?>
 
 <p class="nav"><a href="?logout">Uitloggen</a></p>
similarity index 100%
rename from admin/pass.html
rename to login/pass.html
similarity index 100%
rename from admin/pass.php
rename to login/pass.php
similarity index 100%
rename from admin/setmail.php
rename to login/setmail.php
similarity index 100%
rename from admin/visits.html
rename to login/visits.html
similarity index 100%
rename from admin/visits.php
rename to login/visits.php