Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28312/functions
Modified Files:
draw_functions.php ical_parser.php
Log Message:
More ereg to preg_match speed tweeks.
Index: draw_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/draw_functions.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** draw_functions.php 8 Dec 2002 09:45:59 -0000 1.4
--- draw_functions.php 20 May 2004 06:04:14 -0000 1.5
***************
*** 5,9 ****
global $gridLength;
! ereg ("([0-9]{2})([0-9]{2})", $start, $time);
$sta_h = $time[1];
$sta_min = $time[2];
--- 5,9 ----
global $gridLength;
! preg_match ('/([0-9]{2})([0-9]{2})/', $start, $time);
$sta_h = $time[1];
$sta_min = $time[2];
***************
*** 14,18 ****
}
! ereg ("([0-9]{2})([0-9]{2})", $end, $time);
$end_h = $time[1];
$end_min = $time[2];
--- 14,18 ----
}
! preg_match ('/([0-9]{2})([0-9]{2})/', $end, $time);
$end_h = $time[1];
$end_min = $time[2];
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.164
retrieving revision 1.165
diff -C2 -d -r1.164 -r1.165
*** ical_parser.php 20 May 2004 05:46:23 -0000 1.164
--- ical_parser.php 20 May 2004 06:04:14 -0000 1.165
***************
*** 205,209 ****
if (isset($start_time) && $start_time != '') {
preg_match ('/([0-9]{2})([0-9]{2})/', $start_time, $time);
! preg_match ('([0-9]{2})([0-9]{2})', $end_time, $time2);
if (isset($start_unixtime) && isset($end_unixtime)) {
$length = $end_unixtime - $start_unixtime;
--- 205,209 ----
if (isset($start_time) && $start_time != '') {
preg_match ('/([0-9]{2})([0-9]{2})/', $start_time, $time);
! preg_match ('/([0-9]{2})([0-9]{2})/', $end_time, $time2);
if (isset($start_unixtime) && isset($end_unixtime)) {
$length = $end_unixtime - $start_unixtime;
***************
*** 213,217 ****
$drawKey = drawEventTimes($start_time, $end_time);
! ereg ('([0-9]{2})([0-9]{2})', $drawKey['draw_start'], $time3);
$hour = $time3[1];
$minute = $time3[2];
--- 213,217 ----
$drawKey = drawEventTimes($start_time, $end_time);
! preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3);
$hour = $time3[1];
$minute = $time3[2];
***************
*** 950,954 ****
$exdata = str_replace('T', '', $exdata);
$exdata = str_replace('Z', '', $exdata);
! ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})', $exdata, $regs);
$except_dates[] = $regs[1] . $regs[2] . $regs[3];
$except_times[] = $regs[4] . $regs[5];
--- 950,954 ----
$exdata = str_replace('T', '', $exdata);
$exdata = str_replace('Z', '', $exdata);
! preg_match ('/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})/', $exdata, $regs);
$except_dates[] = $regs[1] . $regs[2] . $regs[3];
$except_times[] = $regs[4] . $regs[5];
|