diff options
Diffstat (limited to 'functions/template.php')
-rw-r--r-- | functions/template.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/functions/template.php b/functions/template.php index 17994da..c37ba56 100644 --- a/functions/template.php +++ b/functions/template.php @@ -93,8 +93,8 @@ class Page { $location = sanitizeForWeb(stripslashes(urldecode($new_val2['location']))); $description = sanitizeForWeb(stripslashes(urldecode($new_val2['description']))); if (!empty($description)) { - $description = ereg_replace('(blocked)?([[:alpha:]]+://([^<>&[:space:]]|&)+[[:alnum:]/])', '<a target="_new" href="\2">\2</a>', $description); - $description = ereg_replace('(blocked)?(mailto:)?([[:alnum:]_.%+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,4})', '<a href="mailto:\3">\3</a>', $description); + $description = preg_replace('(blocked)?([[:alpha:]]+://([^<>&[:space:]]|&)+[[:alnum:]/])', '<a target="_new" href="\2">\2</a>', $description); + $description = preg_replace('(blocked)?(mailto:)?([[:alnum:]_.%+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,4})', '<a href="mailto:\3">\3</a>', $description); } $event_start = $new_val2['event_start']; @@ -395,7 +395,7 @@ class Page { $key = mktime($regs_tmp[1],$regs_tmp[2],0,$this_month,$this_day,$this_year); $key = date ($timeFormat, $key); - if (ereg('([0-9]{1,2}):00', $key)) { + if (preg_match('/([0-9]{1,2}):00/', $key)) { $even_row = '2'; # column of times colspan = 4 to cover navigation links at top $weekdisplay .= '<tr>'; @@ -408,7 +408,7 @@ class Page { $weekdisplay .= '<td bgcolor="#a1a5a9" width="1" height="' . $phpiCal_config->gridLength . '"></td>'; } else { $even_row = ''; - if (ereg('([0-9]{1,2}):30', $key)) $even_row = '3'; + if (preg_match('/([0-9]{1,2}):30/', $key)) $even_row = '3'; # empty row for each gridLength, to the right of times and left of first weekday $weekdisplay .= '<tr>'; $weekdisplay .= '<td bgcolor="#a1a5a9" width="1" height="' . $phpiCal_config->gridLength . '"></td>'; @@ -1142,7 +1142,7 @@ HEREDOC; } - function Page($file = 'std.tpl') { + function __construct($file = 'std.tpl') { global $phpiCal_config; if (!file_exists($file)){ #look for it in default if not found |