[git] web/master.git branch master updated. 2ac437b
| From: | bjori@php.net | Date: | Wed, 01 Feb 2012 07:57:21 +0000 |
| Subject: | [git] web/master.git branch master updated. 2ac437b | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-12998@lists.php.net to get a copy of this message | ||
The branch, master on web/master.git has been updated
via 2ac437b26766e87808e8b4f362439057a82313be (commit)
from e4c5dd6f0d35851a924e8b29620491cd1757409a (commit)
http://git.php.net/?p=web/master.git;a=log;h=2ac437b26766e87808e8b4f362439057a82313be;hp=e4c5dd6f0d35851a924e8b29620491cd1757409a
Summary of changes:
manage/mirrors.php | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
-- Log ----------------------------------------
commit 2ac437b26766e87808e8b4f362439057a82313be
Author: Hannes Magnusson <bjori@redpill-linpro.com>
Date: Wed Feb 1 08:50:20 2012 +0100
Do the awesome register global things before we use the variables
diff --git a/manage/mirrors.php b/manage/mirrors.php
index 5df2a38..dc31dfe 100644
--- a/manage/mirrors.php
+++ b/manage/mirrors.php
@@ -8,6 +8,13 @@ define('PHP_SELF', hsc($_SERVER['PHP_SELF']));
head("mirror administration");
db_connect();
+$valid_fields = array('hostname', 'mode', 'active',
'mirrortype', 'cname', 'maintainer', 'providername',
'providerurl', 'cc', 'lang', 'has_stats', 'acmt',
'reason');
+
+foreach($valid_fields as $k) {
+ if (isset($_REQUEST[$k])) $$k = $_REQUEST[$k];
+}
+
+
// Get boolean values from form
$active = isset($active) ? 1 : 0;
$has_stats = isset($has_stats) ? 1 : 0;
@@ -19,11 +26,6 @@ list($checktime) = mysql_fetch_row($lct);
if (isset($_REQUEST['id'])) $id = (int)$_REQUEST['id'];
-$valid_fields = array('hostname', 'mode', 'active',
'mirrortype', 'cname', 'maintainer', 'providername',
'providerurl', 'cc', 'lang', 'has_stats', 'acmt',
'reason');
-
-foreach($valid_fields as $k) {
- if (isset($_REQUEST[$k])) $$k = $_REQUEST[$k];
-}
// We have something to update in the database
if (isset($id) && isset($hostname)) {
Thank you for your contribution.