mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
worked around stupid php5.2 empty haystack warnings
This commit is contained in:
parent
5224372bfc
commit
6a990be520
@ -183,7 +183,7 @@
|
||||
|
||||
foreach($time as $t)
|
||||
{
|
||||
if (strstr($t,'-') !== False && strstr($t,'/') === False)
|
||||
if (strpos($t,'-') !== False && strpos($t,'/') === False)
|
||||
{
|
||||
list($min,$max) = $arr = explode('-',$t);
|
||||
|
||||
@ -638,7 +638,7 @@
|
||||
$times['error'] .= $line;
|
||||
}
|
||||
}
|
||||
elseif (strstr($line,$this->cronline) !== False)
|
||||
elseif (strpos($line,$this->cronline) !== False)
|
||||
{
|
||||
$cron_units = array('min','hour','day','month','dow');
|
||||
foreach($cron_units as $n => $u)
|
||||
|
@ -300,7 +300,7 @@ class bolink extends solink
|
||||
{
|
||||
if (is_array($id))
|
||||
{
|
||||
if (!strstr($app_link_id,':')) $app_link_id = $this->temp_link_id($app2,$id2); // create link_id of temporary link, if not given
|
||||
if (strpos($app_link_id,':') === false) $app_link_id = $this->temp_link_id($app2,$id2); // create link_id of temporary link, if not given
|
||||
|
||||
if (isset($id[$app_link_id]) && is_array($id[$app_link_id])) // check for unlinked-marker
|
||||
{
|
||||
@ -697,7 +697,7 @@ class bolink extends solink
|
||||
@reset($this->link_pathes);
|
||||
while ((list($valid,$trans) = @each($this->link_pathes)) && !$tfname)
|
||||
{ // check case-insensitive for WIN etc.
|
||||
$check = $valid[0] == '\\' || strstr(':',$valid) ? 'eregi' : 'ereg';
|
||||
$check = $valid[0] == '\\' || strpos(':',$valid) !== false ? 'eregi' : 'ereg';
|
||||
$valid2 = str_replace('\\','/',$valid);
|
||||
//echo "<p>attach_file: ereg('".$this->send_file_ips[$valid]."', '$file[ip]')=".ereg($this->send_file_ips[$valid],$file['ip'])."</p>\n";
|
||||
if ($check('^('.$valid2.')(.*)$',$file['path'],$parts) &&
|
||||
@ -870,7 +870,7 @@ class bolink extends solink
|
||||
*/
|
||||
function is_win_path($path)
|
||||
{
|
||||
return $path[0] == '\\' || strstr($path,':');
|
||||
return $path{0} == '\\' || $path{1} == ':';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,23 +76,23 @@
|
||||
/*
|
||||
Determine platform
|
||||
*/
|
||||
if(strstr($HTTP_USER_AGENT,'Win'))
|
||||
if(strpos($HTTP_USER_AGENT,'Win') !== false)
|
||||
{
|
||||
$this->BROWSER_PLATFORM='Win';
|
||||
}
|
||||
elseif(strstr($HTTP_USER_AGENT,'Mac'))
|
||||
elseif(strpos($HTTP_USER_AGENT,'Mac') !== false)
|
||||
{
|
||||
$this->BROWSER_PLATFORM='Mac';
|
||||
}
|
||||
elseif(strstr($HTTP_USER_AGENT,'Linux'))
|
||||
elseif(strpos($HTTP_USER_AGENT,'Linux') !== false)
|
||||
{
|
||||
$this->BROWSER_PLATFORM='Linux';
|
||||
}
|
||||
elseif(strstr($HTTP_USER_AGENT,'Unix'))
|
||||
elseif(strpos($HTTP_USER_AGENT,'Unix') !== false)
|
||||
{
|
||||
$this->BROWSER_PLATFORM='Unix';
|
||||
}
|
||||
elseif(strstr($HTTP_USER_AGENT,'Beos'))
|
||||
elseif(strpos($HTTP_USER_AGENT,'Beos') !== false)
|
||||
{
|
||||
$this->BROWSER_PLATFORM='Beos';
|
||||
}
|
||||
|
@ -777,7 +777,7 @@
|
||||
while ($f = readdir($d))
|
||||
{
|
||||
$ext = strtolower(strrchr($f,'.'));
|
||||
if (($ext == '.gif' || $ext == '.png') && strstr($f,'navbar') === False)
|
||||
if (($ext == '.gif' || $ext == '.png') && strpos($f,'navbar') === False)
|
||||
{
|
||||
return True;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class contacts extends bocontacts
|
||||
$fields = explode(',',$fields);
|
||||
}
|
||||
if (!$order) $order = $fields ? $fields[0] : 'org_name,n_family,n_given';
|
||||
if ($order && !strstr($order,'_')) $order = 'contact_'.$order;
|
||||
if ($order && strpos($order,'_') === false) $order = 'contact_'.$order;
|
||||
|
||||
//echo '<p>contacts::search('.($cquery ? $cquery.'*' : $query).','.print_r($fields,true).",'$order $sort','','".($cquery ? '' : '%')."',false,'OR',".(!$limit ? 'false' : "array($start,$limit)").",".print_r($sfilter,true).");</p>\n";
|
||||
$rows =& $this->search($cquery ? $cquery.'*' : $query,$fields,$order.($sort ? ' '.$sort : ''),'',
|
||||
|
@ -448,7 +448,7 @@ class egw_framework
|
||||
if ($data['status'] == 4)
|
||||
{
|
||||
$apps[$app]['target'] = ' target="'.$app.'" onClick="'."if (this != '') { window.open(this+'".
|
||||
(strstr($apps[$app]['url'],'?') ? '&' : '?').
|
||||
(strpos($apps[$app]['url'],'?') !== false ? '&' : '?').
|
||||
"referer='+encodeURI(location),this.target,'width=800,height=600,scrollbars=yes,resizable=yes'); return false; } else { return true; }".'"';
|
||||
}
|
||||
elseif(isset($GLOBALS['egw_info']['flags']['navbar_target']) && $GLOBALS['egw_info']['flags']['navbar_target'])
|
||||
|
@ -215,7 +215,7 @@ Calendar.setup(
|
||||
$fields[$n] = $i;
|
||||
break;
|
||||
}
|
||||
if (strstr($long_name,$fields[$n]) == $long_name) // partcial match => multibyte saver
|
||||
if (@strstr($long_name,$fields[$n]) == $long_name) // partcial match => multibyte saver
|
||||
{
|
||||
$partcial_match = $i;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@
|
||||
function gethttpsocketfile($file,$user='',$passwd='',$string=False)
|
||||
{
|
||||
$server = str_replace('http://','',$file);
|
||||
$file = strstr($server,'/');
|
||||
$file = @strstr($server,'/');
|
||||
$server = str_replace($file,'',$server);
|
||||
|
||||
//allows for access to http-auth pages - added by Dave Hall <dave.hall@mbox.com.au>
|
||||
|
@ -566,7 +566,7 @@ class PHPMailer
|
||||
// Retry while there is no connection
|
||||
while($index < count($hosts) && $connection == false)
|
||||
{
|
||||
if(strstr($hosts[$index], ":"))
|
||||
if(strpos($hosts[$index], ":") !== false)
|
||||
list($host, $port) = explode(":", $hosts[$index]);
|
||||
else
|
||||
{
|
||||
|
@ -317,7 +317,7 @@ class SMTP
|
||||
# headers.
|
||||
$field = substr($lines[0],0,strpos($lines[0],":"));
|
||||
$in_headers = false;
|
||||
if(!empty($field) && !strstr($field," ")) {
|
||||
if(!empty($field) && strpos($field," ") === false) {
|
||||
$in_headers = true;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@
|
||||
{
|
||||
$data = &$this->charsets[$charset = strtolower($this->db->f('charset'))];
|
||||
$lang = $this->langs[$this->db->f('lang')].' ('.$this->db->f('lang').')';
|
||||
if ($distinct || strstr($data,$lang) === false)
|
||||
if ($distinct || strpos($data,$lang) === false)
|
||||
{
|
||||
$data .= ($data ? ', ' : $charset.': ').$lang;
|
||||
}
|
||||
|
@ -3310,8 +3310,7 @@ class XML
|
||||
function prestr ( $string, $delimiter )
|
||||
{
|
||||
// Return the substring.
|
||||
return substr($string, 0, strlen($string) - strlen(strstr($string,
|
||||
"$delimiter")));
|
||||
return substr($string, 0, strlen($string) - strlen(@strstr($string,$delimiter)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -770,7 +770,7 @@ function _sidebox_menu_item($item_link='',$item_text='')
|
||||
$var['item_link'] = $item_link['link'];
|
||||
if ($item_link['target'])
|
||||
{
|
||||
if (strstr($item_link['target'], 'target=')) {
|
||||
if (strpos($item_link['target'], 'target=') !== false) {
|
||||
$var['target'] = $item_link['target'];
|
||||
} else {
|
||||
$var['target'] = ' target="' . $item_link['target'] . '"';
|
||||
|
Loading…
Reference in New Issue
Block a user