com web/master: Unify the place where mirror admins are listed and add myself so I can make some changes to mirrors for the sake of bug reports as
there is very slow response time on some of those laying about: include/functions.inc manage/mirrors.php manage/pinfo.php
| From: | Kalle Sommer Nielsen | Date: | Tue, 17 Oct 2017 17:21:04 +0000 |
| Subject: | com web/master: Unify the place where mirror admins are listed and add myself so I can make some changes to mirrors for the sake of bug reports as there is very slow response time on some of those laying about: include/functions.inc manage/mirrors.php manage/pinfo.php |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-26475@lists.php.net to get a copy of this message | ||
Commit: c3c63822872a1f78e128d83e50f9c3c98242bc4d
Author: Kalle Sommer Nielsen <kalle@php.net> Tue, 17 Oct 2017 19:21:04 +0200
Parents: ff17536053616edace4b17d41aff9acd4598f5c5
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=c3c63822872a1f78e128d83e50f9c3c98242bc4d
Log:
Unify the place where mirror admins are listed and add myself so I can make some changes to mirrors
for the sake of bug reports as there is very slow response time on some of those laying about
Changed paths:
M include/functions.inc
M manage/mirrors.php
M manage/pinfo.php
Diff:
diff --git a/include/functions.inc b/include/functions.inc
index 9869c3e..6b969bf 100644
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -437,6 +437,32 @@ function is_admin($user) {
return in_array($user, $admins);
}
+function is_mirror_site_admin($user) {
+ $admins = array(
+ "jimw",
+ "rasmus",
+ "andrei",
+ "zeev",
+ "andi",
+ "sas",
+ "thies",
+ "rubys",
+ "ssb",
+ "imajes",
+ "goba",
+ "derick",
+ "cortesi",
+ "wez",
+ "bjori",
+ "philip",
+ "danbrown",
+ "tyrael",
+ "dm",
+ "kalle"
+ );
+ return in_array($user, $admins);
+}
+
# returns false if $user is not allowed to modify $userid
function can_modify($user,$userid) {
if (is_admin($user)) return true;
diff --git a/manage/mirrors.php b/manage/mirrors.php
index f87c2c0..6d4c9c9 100644
--- a/manage/mirrors.php
+++ b/manage/mirrors.php
@@ -682,18 +682,3 @@ function print_version($version)
else { echo $version; }
}
-// Check if a user should modify the mirror data
-// TODO: use acls, once implemented
-function is_mirror_site_admin($user) {
- if (in_array(
- $user,
- array(
- "jimw", "rasmus", "andrei", "zeev",
"andi", "sas", "thies",
- "rubys", "ssb", "imajes", "goba",
"derick", "cortesi", "wez",
- "bjori", "philip", "danbrown", "tyrael",
"dm",
- )
- )
- ) {
- return TRUE;
- } else { return FALSE; }
-}
diff --git a/manage/pinfo.php b/manage/pinfo.php
index 7c049b3..4968bb7 100644
--- a/manage/pinfo.php
+++ b/manage/pinfo.php
@@ -6,20 +6,4 @@ if (!is_mirror_site_admin($cuser)) {
exit;
}
-phpinfo();
-
-function is_mirror_site_admin($user) {
- if (in_array(
- $user,
- array(
- "jimw", "rasmus", "andrei", "zeev",
"andi", "sas", "thies",
- "rubys", "ssb", "imajes", "goba",
"derick", "cortesi", "wez",
- "bjori", "philip", "danbrown", "googleguy",
- )
- )
- ) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
+phpinfo();
\ No newline at end of file