worked around stupid php5.2 empty haystack warnings

This commit is contained in:
Ralf Becker 2007-04-29 14:28:47 +00:00
parent c81097ab13
commit 6675194ff8
3 changed files with 4 additions and 4 deletions

View File

@ -236,7 +236,7 @@ class bocontacts extends socontacts
if (is_null($type)) $type = $contact['fileas_type']; if (is_null($type)) $type = $contact['fileas_type'];
if (!$type) $type = $this->fileas_types[0]; if (!$type) $type = $this->fileas_types[0];
if (strstr($type,'n_fn')) $contact['n_fn'] = $this->fullname($contact); if (strpos($type,'n_fn') !== false) $contact['n_fn'] = $this->fullname($contact);
$fileas = str_replace(array('n_prefix','n_given','n_middle','n_family','n_suffix','n_fn','org_name','org_unit','adr_one_locality'), $fileas = str_replace(array('n_prefix','n_given','n_middle','n_family','n_suffix','n_fn','org_name','org_unit','adr_one_locality'),
array($contact['n_prefix'],$contact['n_given'],$contact['n_middle'],$contact['n_family'],$contact['n_suffix'], array($contact['n_prefix'],$contact['n_given'],$contact['n_middle'],$contact['n_family'],$contact['n_suffix'],

View File

@ -80,7 +80,7 @@ class csv_export
foreach($fields as $field => $label) foreach($fields as $field => $label)
{ {
$value = $data[$field]; $value = $data[$field];
if (strstr($value,$this->separator) !== false || strstr($value,"\n") !== false || strstr($value,"\r") !== false) if (strpos($value,$this->separator) !== false || strpos($value,"\n") !== false || strpos($value,"\r") !== false)
{ {
$value = '"'.str_replace(array('\\','"'),array('\\\\','\\"'),$value).'"'; $value = '"'.str_replace(array('\\','"'),array('\\\\','\\"'),$value).'"';
} }

View File

@ -530,7 +530,7 @@ class uicontacts extends bocontacts
case 'email': case 'email':
case 'email_home': case 'email_home':
$action_msg = lang('%1 added',$action=='email'?lang('Business email') : lang('Home email')); $action_msg = lang('%1 added',$action=='email'?lang('Business email') : lang('Home email'));
if (($Ok = !!($contact = $this->read($id)) && strstr($contact[$action],'@'))) if (($Ok = !!($contact = $this->read($id)) && strpos($contact[$action],'@') !== false))
{ {
if(!@is_object($GLOBALS['egw']->js)) $GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript'); if(!@is_object($GLOBALS['egw']->js)) $GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
@ -1450,7 +1450,7 @@ $readonlys['button[vcard]'] = true;
*/ */
function email2link($email) function email2link($email)
{ {
if (!strstr($email,'@')) return ''; if (strpos($email,'@') == false) return '';
if($GLOBALS['egw_info']['user']['apps']['felamimail']) if($GLOBALS['egw_info']['user']['apps']['felamimail'])
{ {