Changeset 5921 for trunk/calendar/inc/class.boicalendar.inc.php
- Timestamp:
- 04/11/12 17:21:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.boicalendar.inc.php
r5316 r5921 1278 1278 1279 1279 $this->line = $this->line + 1; 1280 while ( ereg("^[[:space:]]", $ical_text[$this->line])) {1280 while (preg_match('/^[[:space:]]/', $ical_text[$this->line])) { 1281 1281 $str .= substr(str_replace("\r\n", '', $ical_text[$this->line]), 1); 1282 1282 $this->line = $this->line + 1; … … 1392 1392 function parse_parameters(& $event, $majortype, $value) { 1393 1393 //$this->debug ('value: '.$value); 1394 if (! ereg('[\=\;]', $value)) {1394 if (!preg_match('/[\=\;]/', $value)) { 1395 1395 $return_value[] = Array ( 1396 1396 'param' => $majortype, … … 1399 1399 $value = ''; 1400 1400 } 1401 elseif ( ereg('(.*(\:\\\\)?.*):(.*)', $value, $temp)) {1401 elseif (preg_match('/(.*(\:\\\\)?.*):(.*)/', $value, $temp)) { 1402 1402 //$this->debug('Value : '._debug_array($temp,False)); 1403 1403 //$this->debug('Param '.$majortype.' Value : '.$temp[3]); … … 1409 1409 $value = str_replace(':MAILTO', '', $temp[1]); 1410 1410 } 1411 while ( ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)', $value, $temp)) {1411 while (preg_match('/(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)/', $value, $temp)) { 1412 1412 //$this->debug('Value : '._debug_array($temp,False)); 1413 1413 //$this->debug('Param '.$temp[2].' Value : '.$temp[3]); … … 1420 1420 } 1421 1421 } else { 1422 while ( ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)', $value, $temp)) {1422 while (preg_match('/(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)/', $value, $temp)) { 1423 1423 $this->debug('Value : ' . _debug_array($temp, False)); 1424 1424 $this->debug('Param ' . $temp[2] . ' Value : ' . $temp[3]); … … 2347 2347 // } 2348 2348 2349 ereg($property_regexp, $text, $temp);2349 preg_match("/$property_regexp/", $text, $temp); 2350 2350 //$this->debug ('Majortype dump: '._debug_array($temp, false) ); 2351 2351 $majortype = str_replace('-', '_', strtolower($temp[1])); … … 2381 2381 if (isset ($_f_['day_raw']) OR $_f_['day_raw']) { 2382 2382 // Days 2383 // if( ereg('D', $_f_['day_raw']))2383 // if(preg_match('/D/', $_f_['day_raw'])) 2384 2384 if (strstr($_f_['day_raw'], 'D')) { 2385 2385 $dur['days'] = eregi_replace("([0-9]+)D(.*)", "\\1", $_f_['day_raw']); … … 2387 2387 2388 2388 // Weeks 2389 // if( ereg("W", $_f_["day_raw"]))2389 // if(preg_match('/W/', $_f_["day_raw"])) 2390 2390 if (strstr($_f_['day_raw'], 'W')) { 2391 2391 $dur['weeks'] = eregi_replace("([^|.*]+D)?([0-9]+)W", "\\2", $_f_['day_raw']); … … 2396 2396 if (isset ($_f_['time_raw']) OR $_f_['time_raw']) { 2397 2397 // Hours 2398 // if( ereg("H", $_f_["time_raw"]))2398 // if(preg_match('/H/', $_f_["time_raw"])) 2399 2399 if (strstr($_f_['time_raw'], 'H')) { 2400 2400 $dur['hours'] = eregi_replace("([0-9]+)H(.*)", "\\1", $_f_['time_raw']); … … 2403 2403 // Minutes 2404 2404 /* If you find better, contact me very quickly :) */ 2405 // if( ereg("M", $_f_["time_raw"]))2405 // if(preg_match('/M/', $_f_["time_raw"])) 2406 2406 if (strstr($_f_['time_raw'], 'M')) { 2407 2407 $dur['minutes'] = eregi_replace("([^|.*]+H)?([0-9]+)M(.*)", "\\2", $_f_['time_raw']); … … 2410 2410 // Seconds 2411 2411 /* Same comment :) */ 2412 // if( ereg("S", $_f_["time_raw"]) )2412 // if(preg_match('/S/', $_f_["time_raw"]) ) 2413 2413 if (strstr($_f_['time_raw'], 'S')) { 2414 2414 $dur['seconds'] = eregi_replace("([^|.*]+M)?([0-9]+)S(.*)", "\\2", $_f_['time_raw']);
Note: See TracChangeset
for help on using the changeset viewer.