forked from extern/egroupware
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 {
|
class ajaxcalendar {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var object $calendar object to handle events
|
* calendar object to handle events
|
||||||
|
*
|
||||||
|
* @var bocalupdate
|
||||||
*/
|
*/
|
||||||
var $calendar;
|
var $calendar;
|
||||||
|
|
||||||
function ajaxcalendar() {
|
function ajaxcalendar()
|
||||||
|
{
|
||||||
$this->calendar = new bocalupdate;
|
$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']);
|
$details['to-fullname'] = $GLOBALS['egw']->common->display_fullname('',$details['to-firstname'],$details['to-lastname']);
|
||||||
|
|
||||||
$to = $GLOBALS['egw']->accounts->id2name($userid,'account_email');
|
$to = $GLOBALS['egw']->accounts->id2name($userid,'account_email');
|
||||||
if (!$to || !strstr($to,'@'))
|
if (!$to || strpos($to,'@') === false)
|
||||||
{
|
{
|
||||||
// ToDo: give an error-message
|
// 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";
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
$charset = split("[\t\n ]+",$lines[0]); // give a bit flexibility in the syntax AND remove the lineend (\n)
|
$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]);
|
$lines = $GLOBALS['egw']->translation->convert($lines,$charset[1]);
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,7 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'MONTHLY':
|
case 'MONTHLY':
|
||||||
$vcardData['recur_type'] = strstr($recurence,'BYDAY') ?
|
$vcardData['recur_type'] = strpos($recurence,'BYDAY') !== false ?
|
||||||
MCAL_RECUR_MONTHLY_WDAY : MCAL_RECUR_MONTHLY_MDAY;
|
MCAL_RECUR_MONTHLY_WDAY : MCAL_RECUR_MONTHLY_MDAY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1000,7 +1000,7 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'MONTHLY':
|
case 'MONTHLY':
|
||||||
$vcardData['recur_type'] = strstr($recurence,'BYDAY') ?
|
$vcardData['recur_type'] = strpos($recurence,'BYDAY') !== false ?
|
||||||
MCAL_RECUR_MONTHLY_WDAY : MCAL_RECUR_MONTHLY_MDAY;
|
MCAL_RECUR_MONTHLY_WDAY : MCAL_RECUR_MONTHLY_MDAY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -520,7 +520,7 @@ ORDER BY cal_user_type, cal_usre_id
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// new event (without uid) or new created referencing event => create new uid
|
// 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);
|
$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__);
|
$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
|
if ($baseurl) // we append the value to the baseurl
|
||||||
{
|
{
|
||||||
$baseurl .= strstr($baseurl,'?') === False ? '?' : '&';
|
$baseurl .= strpos($baseurl,'?') === False ? '?' : '&';
|
||||||
$onchange="location='$baseurl'+this.value;";
|
$onchange="location='$baseurl'+this.value;";
|
||||||
}
|
}
|
||||||
else // we add $name=value to the actual location
|
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').
|
$participants[$uid] = $participant_types[$uid{0}][$id] = ($res_data['new_status'] ? ExecMethod($res_data['new_status'],$id) : 'U').
|
||||||
((int) $quantity > 1 ? (int)$quantity : '');
|
((int) $quantity > 1 ? (int)$quantity : '');
|
||||||
// if new_status == 'x', resource is not bookable
|
// 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($participant_types[$uid{0}][$id]);
|
||||||
unset($participants[$uid]);
|
unset($participants[$uid]);
|
||||||
|
@ -1676,7 +1676,7 @@ class uiviews extends uical
|
|||||||
'menuaction' => 'calendar.uiviews.planner',
|
'menuaction' => 'calendar.uiviews.planner',
|
||||||
'planner_days' => 1,
|
'planner_days' => 1,
|
||||||
'date' => date('Ymd',$t),
|
'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)
|
if ($days < 5)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user