aboutsummaryrefslogtreecommitdiffstats
path: root/search.php
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2017-02-20 18:12:46 +0100
committerDaniel Lange <DLange@git.local>2017-02-20 18:12:46 +0100
commit335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70 (patch)
tree6dfb123b3ff27b46bcdf9ef9acf8fa41bffec946 /search.php
parent7a4da3f67cb891cd5408bb4b511a54ccf9662485 (diff)
downloadphpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.gz
phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.tar.bz2
phpicalendar-335d3c5c9c0b24ff5e07cd1968236a8dbc4f2c70.zip
PHP 7 compatibility from Sourceforge #680
Diffstat (limited to 'search.php')
-rw-r--r--search.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/search.php b/search.php
index 8e1f66f..6c1846e 100644
--- a/search.php
+++ b/search.php
@@ -104,7 +104,7 @@ function format_search($search_str) {
$search_str = trim($search_str);
$search_str = str_replace(' and ', ' ', $search_str);
$search_str = str_replace(' - ', ' ', $search_str);
- $search_str = ereg_replace('[[:space:]]+',' ', $search_str);
+ $search_str = preg_replace('[[:space:]]+',' ', $search_str);
$search_str = str_replace(' not ', ' -', $search_str);
// start out with an AND array of all the items
@@ -260,7 +260,7 @@ function format_recur($arr) {
if ($arr['BYMONTHDAY'][(count($arr['BYMONTHDAY']) - 1)] == '0') unset($arr['BYMONTHDAY'][$last]);
$last = count($arr['BYMONTHDAY']) - 1;
foreach ($arr['BYMONTHDAY'] as $key => $day) {
- ereg('(-{0,1})([0-9]{1,2})',$day,$regs);
+ preg_match('/(-{0,1})([0-9]{1,2})/',$day,$regs);
list($junk,$sign,$day) = $regs;
if ($sign != '') $list .= $sign;
if ($key == $last) $list .= $day;
@@ -274,7 +274,7 @@ function format_recur($arr) {
$list = '';
$last = count($arr['BYDAY']) - 1;
foreach ($arr['BYDAY'] as $key => $day) {
- ereg('([-\+]{0,1})([0-9]{0,1})([A-Z]{2})',$day,$regs);
+ preg_match('/([-\+]{0,1})([0-9]{0,1})([A-Z]{2})/',$day,$regs);
list($junk,$sign,$day_num,$day_txt) = $regs;
$num = two2threeCharDays($day_txt,false);
if ($sign != '') $list .= $sign;

© 2014-2024 Faster IT GmbH | imprint | privacy policy