forked from extern/egroupware
Switch to foreach vs. reset/while
This commit is contained in:
parent
ff8d604036
commit
cb1f65ec54
@ -6,7 +6,7 @@
|
||||
* Handles limiting number of rows displayed *
|
||||
* Copyright (C) 2000, 2001 Joseph Engo *
|
||||
* Copyright (C) 2002, 2003 Joseph Engo, Bettina Gille *
|
||||
* -------------------------------------------------------------------------*
|
||||
* ------------------------------------------------------------------------ *
|
||||
* This library is part of the phpGroupWare API *
|
||||
* http://www.phpgroupware.org *
|
||||
* ------------------------------------------------------------------------ *
|
||||
@ -65,10 +65,7 @@
|
||||
$this->maxmatches = 15;
|
||||
}
|
||||
|
||||
if(isset($GLOBALS['HTTP_GET_VARS']['menuaction']))
|
||||
{
|
||||
$this->action = $GLOBALS['HTTP_GET_VARS']['menuaction'];
|
||||
}
|
||||
$this->action = $_GET['menuaction'] ? $_GET['menuaction'];
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -118,8 +115,7 @@
|
||||
}
|
||||
elseif($extravars && is_array($extravars))
|
||||
{
|
||||
@reset($extravars);
|
||||
while(list($var,$value) = each($extravars))
|
||||
foreach($extravars as $var => $value)
|
||||
{
|
||||
if($var != 'menuaction')
|
||||
{
|
||||
@ -143,7 +139,7 @@
|
||||
function set_link($align,$img,$link,$alt,$extravars)
|
||||
{
|
||||
$hidden = '';
|
||||
while(list($var,$value) = each($extravars))
|
||||
foreach($extravars as $var => $value)
|
||||
{
|
||||
if((is_int($value) && $value == 0) || $value)
|
||||
{
|
||||
@ -249,7 +245,7 @@
|
||||
}
|
||||
elseif(is_array($extradata))
|
||||
{
|
||||
while(list($var,$value) = each($extradata))
|
||||
foreach($extradata as $var => $value)
|
||||
{
|
||||
if($var != 'menuaction')
|
||||
{
|
||||
@ -269,8 +265,7 @@
|
||||
{
|
||||
if(is_array($extra))
|
||||
{
|
||||
@reset($extra);
|
||||
while(list($var,$value) = each($extra))
|
||||
foreach($extra as $var => $value)
|
||||
{
|
||||
$t_extras[] = $var . '=' . $value;
|
||||
}
|
||||
@ -441,9 +436,10 @@
|
||||
$_query = stripslashes($GLOBALS['query']);
|
||||
}
|
||||
|
||||
// If the place a '"' in there search, it will mess everything up
|
||||
// If they place a '"' in their search, it will mess everything up
|
||||
// Our only option is to remove it
|
||||
if (ereg('"',$_query))
|
||||
// if (ereg('"',$_query))
|
||||
if(strstr($query,'"'))
|
||||
{
|
||||
$_query = str_replace('"','',$_query);
|
||||
}
|
||||
@ -526,7 +522,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$filter = $GLOBALS['HTTP_POST_VARS']['filter'] ? $GLOBALS['HTTP_POST_VARS']['filter'] : $GLOBALS['HTTP_GET_VARS']['filter'];
|
||||
$filter = get_var('filter',array('POST','GET'));
|
||||
}
|
||||
|
||||
if (is_long($filter_obj))
|
||||
|
Loading…
Reference in New Issue
Block a user