From 8223e2e9f7d3d6bb265345cfab0eefc4f73c4915 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 26 Apr 2010 19:46:23 +1200 Subject: [PATCH] Replace deprecated split() calls. --- inc/CalDAVRequest.php | 2 +- inc/DAViCalSession.php | 2 +- inc/RRule.php | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 8be428f3..86d49a9c 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -226,7 +226,7 @@ class CalDAVRequest * LOCK things use a "Timeout" header to set a series of reducing alternative values */ if ( isset($_SERVER['HTTP_TIMEOUT']) ) { - $timeouts = split( ',', $_SERVER['HTTP_TIMEOUT'] ); + $timeouts = explode( ',', $_SERVER['HTTP_TIMEOUT'] ); foreach( $timeouts AS $k => $v ) { if ( strtolower($v) == 'infinite' ) { $this->timeout = (isset($c->maximum_lock_timeout) ? $c->maximum_lock_timeout : 86400 * 100); diff --git a/inc/DAViCalSession.php b/inc/DAViCalSession.php index 7f78ebaa..04b6d5d2 100644 --- a/inc/DAViCalSession.php +++ b/inc/DAViCalSession.php @@ -129,7 +129,7 @@ class DAViCalSession extends Session } } else { - $valid_roles = split(',', $roles); + $valid_roles = explode(',', $roles); foreach( $valid_roles AS $k => $v ) { if ( $this->AllowedTo($v) ) return; } diff --git a/inc/RRule.php b/inc/RRule.php index 2a54bf8e..c515d065 100644 --- a/inc/RRule.php +++ b/inc/RRule.php @@ -402,7 +402,7 @@ class iCalDate { function TestByMonth( $monthlist ) { // dbg_error_log( "RRule", " Testing BYMONTH %s against month %d", (isset($monthlist) ? $monthlist : "no month list"), $this->_mo ); if ( !isset($monthlist) ) return true; // If BYMONTH is not specified any month is OK - $months = array_flip(split( ',',$monthlist )); + $months = array_flip(explode( ',',$monthlist )); return isset($months[$this->_mo]); } @@ -414,7 +414,7 @@ class iCalDate { function GetMonthByDay($byday) { // dbg_error_log( "RRule", " Applying BYDAY %s to month", $byday ); $days_in_month = $this->DaysInMonth(); - $dayrules = split(',',$byday); + $dayrules = explode(',',$byday); $set = array(); $first_dow = (date('w',$this->_epoch) - $this->_dd + 36) % 7; foreach( $dayrules AS $k => $v ) { @@ -435,7 +435,7 @@ class iCalDate { function GetMonthByMonthDay($bymonthday) { // dbg_error_log( "RRule", " Applying BYMONTHDAY %s to month", $bymonthday ); $days_in_month = $this->DaysInMonth(); - $dayrules = split(',',$bymonthday); + $dayrules = explode(',',$bymonthday); $set = array(); foreach( $dayrules AS $k => $v ) { $v = intval($v); @@ -455,7 +455,7 @@ class iCalDate { function GetWeekByDay($byday, $increasing = false) { global $ical_weekdays; // dbg_error_log( "RRule", " Applying BYDAY %s to week", $byday ); - $days = split(',',$byday); + $days = explode(',',$byday); $dow = date('w',$this->_epoch); $set = array(); foreach( $days AS $k => $v ) { @@ -565,7 +565,7 @@ class iCalDate { $subset = array(); sort( $set, SORT_NUMERIC ); $max = count($set); - $positions = split( '[^0-9-]', $bysplist ); + $positions = explode( '[^0-9-]', $bysplist ); foreach( $positions AS $k => $v ) { if ( $v < 0 ) { $v += $max; @@ -734,11 +734,11 @@ class RRule { dbg_error_log( "RRule", " new RRule: Start: %s, RRULE: %s", $start->Render(), $this->_rule ); - $parts = split(';',$this->_rule); + $parts = explode(';',$this->_rule); $this->_part = array( 'INTERVAL' => 1 ); foreach( $parts AS $k => $v ) { - list( $type, $value ) = split( '=', $v, 2); -// dbg_error_log( "RRule", " Parts of %s split into %s and %s", $v, $type, $value ); + list( $type, $value ) = explode( '=', $v, 2); +// dbg_error_log( "RRule", " Parts of %s explode into %s and %s", $v, $type, $value ); $this->_part[$type] = $value; }