mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
worked around stupid php5.2 empty haystack warnings
This commit is contained in:
parent
6675194ff8
commit
09f556d5d4
@ -24,11 +24,14 @@ require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocalupdate.inc.php');
|
||||
class ajaxcalendar {
|
||||
|
||||
/**
|
||||
* @var object $calendar object to handle events
|
||||
* calendar object to handle events
|
||||
*
|
||||
* @var bocalupdate
|
||||
*/
|
||||
var $calendar;
|
||||
|
||||
function ajaxcalendar() {
|
||||
function ajaxcalendar()
|
||||
{
|
||||
$this->calendar = new bocalupdate;
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ class bocalupdate extends bocal
|
||||
$details['to-fullname'] = $GLOBALS['egw']->common->display_fullname('',$details['to-firstname'],$details['to-lastname']);
|
||||
|
||||
$to = $GLOBALS['egw']->accounts->id2name($userid,'account_email');
|
||||
if (!$to || !strstr($to,'@'))
|
||||
if (!$to || strpos($to,'@') === false)
|
||||
{
|
||||
// ToDo: give an error-message
|
||||
echo '<p>'.lang('Invalid email-address "%1" for user %2',$to,$GLOBALS['egw']->common->grab_owner_name($userid))."</p>\n";
|
||||
|
@ -298,7 +298,7 @@
|
||||
return false;
|
||||
}
|
||||
$charset = split("[\t\n ]+",$lines[0]); // give a bit flexibility in the syntax AND remove the lineend (\n)
|
||||
if (strstr($charset[0],'charset') && $charset[1])
|
||||
if (strpos($charset[0],'charset') !== false && $charset[1])
|
||||
{
|
||||
$lines = $GLOBALS['egw']->translation->convert($lines,$charset[1]);
|
||||
}
|
||||
|
@ -549,7 +549,7 @@
|
||||
}
|
||||
break;
|
||||
case 'MONTHLY':
|
||||
$vcardData['recur_type'] = strstr($recurence,'BYDAY') ?
|
||||
$vcardData['recur_type'] = strpos($recurence,'BYDAY') !== false ?
|
||||
MCAL_RECUR_MONTHLY_WDAY : MCAL_RECUR_MONTHLY_MDAY;
|
||||
break;
|
||||
|
||||
@ -1000,7 +1000,7 @@
|
||||
}
|
||||
break;
|
||||
case 'MONTHLY':
|
||||
$vcardData['recur_type'] = strstr($recurence,'BYDAY') ?
|
||||
$vcardData['recur_type'] = strpos($recurence,'BYDAY') !== false ?
|
||||
MCAL_RECUR_MONTHLY_WDAY : MCAL_RECUR_MONTHLY_MDAY;
|
||||
break;
|
||||
|
||||
|
@ -520,7 +520,7 @@ ORDER BY cal_user_type, cal_usre_id
|
||||
return false;
|
||||
}
|
||||
// new event (without uid) or new created referencing event => create new uid
|
||||
if (!$event['cal_uid'] || $event['cal_reference'] && strstr($event['cal_uid'],'cal-'.$event['calreference'].'-'))
|
||||
if (!$event['cal_uid'] || $event['cal_reference'] && strpos($event['cal_uid'],'cal-'.$event['calreference'].'-') !== false)
|
||||
{
|
||||
$event['cal_uid'] = $GLOBALS['egw']->common->generate_uid('calendar',$cal_id);
|
||||
$this->db->update($this->cal_table,array('cal_uid' => $event['cal_uid']),array('cal_id' => $cal_id),__LINE__,__FILE__);
|
||||
|
@ -439,7 +439,7 @@ class uical
|
||||
{
|
||||
if ($baseurl) // we append the value to the baseurl
|
||||
{
|
||||
$baseurl .= strstr($baseurl,'?') === False ? '?' : '&';
|
||||
$baseurl .= strpos($baseurl,'?') === False ? '?' : '&';
|
||||
$onchange="location='$baseurl'+this.value;";
|
||||
}
|
||||
else // we add $name=value to the actual location
|
||||
|
@ -123,7 +123,7 @@ class uiforms extends uical
|
||||
$participants[$uid] = $participant_types[$uid{0}][$id] = ($res_data['new_status'] ? ExecMethod($res_data['new_status'],$id) : 'U').
|
||||
((int) $quantity > 1 ? (int)$quantity : '');
|
||||
// if new_status == 'x', resource is not bookable
|
||||
if(strstr($participant_types[$uid{0}][$id],'x'))
|
||||
if(strpos($participant_types[$uid{0}][$id],'x') !== false)
|
||||
{
|
||||
unset($participant_types[$uid{0}][$id]);
|
||||
unset($participants[$uid]);
|
||||
|
@ -1676,7 +1676,7 @@ class uiviews extends uical
|
||||
'menuaction' => 'calendar.uiviews.planner',
|
||||
'planner_days' => 1,
|
||||
'date' => date('Ymd',$t),
|
||||
),false,strstr($class,'calHoliday') || strstr($class,'calBirthday') ? '' : ' title="'.$this->html->htmlspecialchars(lang('Dayview')).'"');
|
||||
),false,strpos($class,'calHoliday') !== false || strpos($class,'calBirthday') !== false ? '' : ' title="'.$this->html->htmlspecialchars(lang('Dayview')).'"');
|
||||
}
|
||||
if ($days < 5)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user