own3mall 5 лет назад
Родитель
Сommit
bc6a81547e

+ 1 - 1
modules/config_games/config_servers.php

@@ -174,7 +174,7 @@ function exec_ogp_module() {
 					{
 						echo "<tr><td><b>$subkey<b></td><td>$subvalue</td>\n";
 						
-						list($attributes,$attrvalue)=each($subvalue);
+						list($attributes,$attrvalue)=array(key($subvalue), current($subvalue));
 
 						foreach($attrvalue as $attrkey => $attrval)
 						{

+ 1 - 1
modules/ftp/includes/registerglobals.inc.php

@@ -438,7 +438,7 @@ function remove_magic_quotes(&$x, $keyname="") {
 	if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1) {
 
 		if (is_array($x)) {
-			while (list($key,$value) = each($x)) {
+			foreach ($x as $key => $value) {
 				if ($value) { remove_magic_quotes($x[$key],$key); }
 			}
 		}

+ 3 - 3
modules/ftp/languages/languages.inc.php

@@ -119,9 +119,9 @@ function printLanguageSelect($fieldname, $onchange, $style, $class) {
 
 	echo "<select name=\"$fieldname\" id=\"$fieldname\" $onchange_full $style_full $class_full>\n";
 
-	while (list($key,$value) = each($languageArray)) {
-	// $key loops over "en", "fr", "nl", ...
-	// $value will be an array like $value["name"] = "English" and $value["file"] = "en.inc.php"
+	foreach ($languageArray as $key => $value) {
+		// $key loops over "en", "fr", "nl", ...
+		// $value will be an array like $value["name"] = "English" and $value["file"] = "en.inc.php"
 		if ($key == $currentlanguage) { $selected = "selected=\"selected\""; }
 		else                          { $selected = ""; }
 		echo "<option value=\"" . $key . "\" $selected>" . $value["name"] . "</option>\n";

+ 3 - 3
modules/ftp/modules/admin_viewlogs/admin_viewlogs.inc.php

@@ -263,7 +263,7 @@ function printTable($sqlquery) {
 		$row = mysql_fetch_array($result, MYSQL_ASSOC);
 		$output .= "<tr>\n";
 		$output .= "<td>Index</td>\n";
-		while(list($fieldname, $fieldvalue) = each($row) ) { $output .= "<td>$fieldname</td>\n"; }
+		foreach ($row as $fieldname => $fieldvalue) { $output .= "<td>$fieldname</td>\n"; }
 		$output .= "</tr>\n";
 		mysql_data_seek($result, 0); // reset row pointer to the first row
 
@@ -272,7 +272,7 @@ function printTable($sqlquery) {
 		while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 			$output .= "<tr>\n";
 			$output .= "<td>$rowcounter</td>\n";
-			while(list($fieldname, $fieldvalue) = each($row) ) { $output .= "<td>" . htmlEncode2($fieldvalue) . "</td>\n"; }
+			foreach ($row as $fieldname => $fieldvalue) { $output .= "<td>" . htmlEncode2($fieldvalue) . "</td>\n"; }
 			$output .= "</tr>\n";
 			$rowcounter++;
 		}
@@ -300,4 +300,4 @@ function printTable($sqlquery) {
 // **************************************************************************************
 // **************************************************************************************
 
-?>
+?>

+ 3 - 3
modules/ftp/modules/advanced_parsing/advanced_parsing.inc.php

@@ -160,7 +160,7 @@ function net2ftp_module_printBody() {
 // -------------------------------------------------------------------------
 // For each sample
 // -------------------------------------------------------------------------
-	while(list($sampleName, $sampleLines) = each($list_samples)) {
+	foreach ($list_samples as $sampleName => $sampleLines) {
 		$net2ftp_output["advanced_parsing"][] = "<span style=\"font-size: 120%; font-weight: bold;\">" . $sampleName . "</span><br />\n";
 // ------------------------------------
 // Input
@@ -179,7 +179,7 @@ function net2ftp_module_printBody() {
 
 // Scan the sample
 			$outputArray = ftp_scanline("", $sampleLines[$i]);
-			while(list($fieldName, $fieldValue) = each($outputArray)) {
+			foreach ($outputArray as $fieldName => $fieldValue) {
 				$net2ftp_output["advanced_parsing"][] = "Line $i: " . $fieldName . ": " . htmlEncode2($fieldValue) . "<br />\n";
 			} // end while
 			$net2ftp_output["advanced_parsing"][] = "<br />\n";
@@ -200,4 +200,4 @@ function net2ftp_module_printBody() {
 // **************************************************************************************
 // **************************************************************************************
 
-?>
+?>

+ 3 - 3
modules/ftp/modules/browse/browse.inc.php

@@ -347,7 +347,7 @@ function net2ftp_module_printBody() {
 	$icon_directory = $net2ftp_globals["application_rootdir_url"] . "/skins/" . $net2ftp_globals["skin"] . "/images/mime";
 
 // Loop over all the sort possibilities
-	while(list($key, $value) = each($sortArray)) {
+	foreach ($sortArray as $key => $value) {
 
 // The list is sorted by the current $key
 // Print the icon representing the current sortorder
@@ -549,7 +549,7 @@ function sort_list($list) {
 // Fill the $return array
 // -------------------------------------------------------------------------
 	$i=1;
-	while(list($tname, $tvalue) = each($temp)) {
+	foreach ($temp as $tname => $tvalue) {
 		$return[$i] = $list[$tname];
 		$i++;
 	}
@@ -566,4 +566,4 @@ function sort_list($list) {
 // **************************************************************************************
 // **************************************************************************************
 
-?>
+?>

+ 2 - 2
modules/ftp/modules/edit/edit.inc.php

@@ -480,7 +480,7 @@ function printTextareaSelect($onchange) {
 	if ($textareaType == "" || $textareaType == "plain") { $plainselected = "selected=\"selected\""; }
 	echo "<option value=\"plain\" $plainselected>Normal textarea</option>\n";
 
-	while(list($pluginName, $value) = each($pluginProperties)) {
+	foreach ($pluginProperties as $pluginName => $value) {
 // Print only the plugins which have 'use' set to yes
 //                        which are textareas
 //                        which are suitable for this browser
@@ -760,4 +760,4 @@ function splitHtml($text, $textareaType) {
 // **************************************************************************************
 // **************************************************************************************
 
-?>
+?>

+ 2 - 2
modules/ftp/modules/view/view.inc.php

@@ -240,7 +240,7 @@ function net2ftp_module_printBody() {
 			'xml' => array('xml')
 		);
 
-		while(list($language, $extensions) = each($list_language_extensions)) {
+		foreach ($list_language_extensions as $language => $extensions) {
 			if (in_array($filename_extension, $extensions)) {
 				$luminous_language = $language;
 				break;
@@ -285,4 +285,4 @@ function net2ftp_module_printBody() {
 // **************************************************************************************
 // **************************************************************************************
 
-?>
+?>

+ 3 - 3
modules/ftp/plugins/jscalendar/calendar.php

@@ -95,7 +95,7 @@ class DHTML_Calendar {
     function _make_js_hash($array) {
         $jstr = '';
         reset($array);
-        while (list($key, $val) = each($array)) {
+        foreach ($array as $key => $val) {
             if (is_bool($val))
                 $val = $val ? 'true' : 'false';
             else if (!is_numeric($val))
@@ -109,11 +109,11 @@ class DHTML_Calendar {
     function _make_html_attr($array) {
         $attrstr = '';
         reset($array);
-        while (list($key, $val) = each($array)) {
+        foreach ($array as $key => $val) {
             $attrstr .= $key . '="' . $val . '" ';
         }
         return $attrstr;
     }
 };
 
-?>
+?>

+ 4 - 4
modules/ftp/skins/blue/login_small.template.php

@@ -20,26 +20,26 @@
 <input type="hidden" name="url"            value="<?php echo htmlEncode2($url); ?>" />
 
 <?php if (is_array($searchoptions) == true) { ?>
-<?php		while (list($key, $value) = each($searchoptions)) { ?>
+<?php		foreach ($searchoptions as $key => $value) { ?>
 <input type="hidden" name="searchoptions[<?php echo htmlEncode2($key); ?>]" value="<?php echo htmlEncode2($value); ?>" />
 <?php		} // end while ?>
 <?php	} // end if ?>
 
 <?php if (is_array($text_splitted) == true) { ?>
-<?php		while (list($key, $value) = each($text_splitted)) { ?>
+<?php		foreach ($text_splitted as $key => $value) { ?>
 <input type="hidden" name="text_splitted[<?php echo htmlEncode2($key); ?>]" value="<?php echo htmlEncode2($value); ?>" />
 <?php		} // end while ?>
 <?php	} // end if ?>
 
 <?php if (is_array($zipactions) == true) { ?>
-<?php		while (list($key, $value) = each($zipactions)) { ?>
+<?php		foreach ($zipactions as $key => $value) { ?>
 <input type="hidden" name="zipactions[<?php echo htmlEncode2($key); ?>]" value="<?php echo htmlEncode2($value); ?>" />
 <?php		} // end while ?>
 <?php	} // end if ?>
 
 <?php if (is_array($zipactions) == true) { ?>
 <?php 	for ($i=1; $i<=sizeof($list["all"]); $i++) { ?>
-<?php 		while (list($key, $value) = each($list["all"][$i])) { ?>
+<?php 		foreach ($list["all"][$i] as $key => $value) { ?>
 <input type="hidden" name="list[<?php echo $i; ?>][<?php echo htmlEncode2($key); ?>]" value="<?php echo htmlEncode2($value); ?>" />
 <?php			} // end while ?>
 <?php 	} // end for ?>

+ 2 - 2
modules/ftp/skins/skins.inc.php

@@ -189,7 +189,7 @@ function printSkinSelect($fieldname, $onchange, $style, $class) {
 
 	echo "<select name=\"$fieldname\" id=\"$fieldname\" $onchange_full $style_full $class_full>\n";
 
-	while (list($key,$value) = each($skinArray)) {
+	foreach ($skinArray as $key => $value) {
 	// $key loops over "blue", "pastel", ...
 	// $value will be an array like $value["name"] = "Blue"
 		if ($key == $currentskin) { $selected = "selected=\"selected\""; }
@@ -1014,4 +1014,4 @@ function printPngImage($src, $alt, $style) {
 // **************************************************************************************
 
 
-?>
+?>

+ 3 - 3
modules/update/blacklist.php

@@ -88,9 +88,9 @@ function exec_ogp_module()
 		
 		foreach($_POST['folder_files'] as $file)
 		{
-			if(in_array($file,$current_blacklist))
+			if(is_array($current_blacklist) && in_array($file,$current_blacklist))
 			{
-				if(!in_array($file,$_POST['blacklist']))
+				if(is_array($_POST['blacklist']) && !in_array($file,$_POST['blacklist']))
 				{
 					$file = $db->real_escape_string($file);
 					$db->query("DELETE FROM `OGP_DB_PREFIXupdate_blacklist` WHERE file_path='$file';");
@@ -254,4 +254,4 @@ function exec_ogp_module()
 	}
 	echo create_back_button($_GET['m']);
 }
-?>
+?>

+ 1 - 1
modules/update/update.php

@@ -170,7 +170,7 @@ function exec_ogp_module()
 								if ($commitsStart >= $commitsToShow) {
 									break;
 								}
-								echo '<li>'.substr($v['commit']['author']['date'],0,10).' - '.$v['commit']['author']['name'] .'</a> committed <a href="'.$v['html_url'].'" target="_blank">'.substr($v[sha],0,7).'...</a><br>';
+								echo '<li>'.substr($v['commit']['author']['date'],0,10).' - '.$v['commit']['author']['name'] .'</a> committed <a href="'.$v['html_url'].'" target="_blank">'.substr($v['sha'],0,7).'...</a><br>';
 								echo '<b>'.$v['commit']['message'] .'</b></li><br>';
 								++$commitsStart;
 							}