Skip to content
Browse files

UNDO

  • Loading branch information...
1 parent 068897d commit 48749f12d8e9d607b9f0a51ecf89a7e1b8f32d28 @acidvertigo acidvertigo committed Aug 16, 2011
Showing with 13 additions and 7 deletions.
  1. +13 −7 catalog/admin/includes/functions/general.php
View
20 catalog/admin/includes/functions/general.php
@@ -117,12 +117,14 @@ function tep_get_path($current_category_id = '') {
}
function tep_get_all_get_params($exclude_array = '') {
-
+ global $_GET;
+
if ($exclude_array == '') $exclude_array = array();
$get_url = '';
- foreach($_GET as $key => $value) {
+ reset($_GET);
+ while (list($key, $value) = each($_GET)) {
if (($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array))) $get_url .= $key . '=' . $value . '&';
}
@@ -332,8 +334,9 @@ function tep_not_null($value) {
}
function tep_browser_detect($component) {
-
- return stristr($_SERVER['HTTP_USER_AGENT'], $component);
+ global $HTTP_USER_AGENT;
+
+ return stristr($HTTP_USER_AGENT, $component);
}
function tep_tax_classes_pull_down($parameters, $selected = '') {
@@ -475,7 +478,7 @@ function tep_get_zone_code($country, $zone, $def_state) {
function tep_get_uprid($prid, $params) {
$uprid = $prid;
if ( (is_array($params)) && (!strstr($prid, '{')) ) {
- foreach($params as $option => $value) {
+ while (list($option, $value) = each($params)) {
$uprid = $uprid . '{' . $option . '}' . $value;
}
}
@@ -804,7 +807,8 @@ function tep_cfg_select_option($select_array, $key_value, $key = '') {
////
// Alias function for module configuration keys
function tep_mod_select_option($select_array, $key_name, $key_value) {
- foreach($select_array as $key => $value) {
+ reset($select_array);
+ while (list($key, $value) = each($select_array)) {
if (is_int($key)) $key = $value;
$string .= '<br /><input type="radio" name="configuration[' . $key_name . ']" value="' . $key . '"';
if ($key_value == $key) $string .= ' checked="checked"';
@@ -817,7 +821,8 @@ function tep_mod_select_option($select_array, $key_name, $key_value) {
////
// Retreive server information
function tep_get_system_information() {
-
+ global $_SERVER;
+
$db_query = tep_db_query("select now() as datetime");
$db = tep_db_fetch_array($db_query);
@@ -1403,6 +1408,7 @@ function tep_validate_ip_address($ip_address) {
}
function tep_get_ip_address() {
+ global $_SERVER;
$ip_address = null;
$ip_addresses = array();

0 comments on commit 48749f1

Please sign in to comment.
Something went wrong with that request. Please try again.