mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
worked around stupid php5.2 empty haystack warnings
This commit is contained in:
parent
c81097ab13
commit
6675194ff8
@ -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'],
|
||||||
|
@ -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).'"';
|
||||||
}
|
}
|
||||||
|
@ -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'])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user