[geeklog-hg] geeklog: Removed functions deprecated in PHP-5.3.0
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Wed Jul 11 11:38:48 EDT 2012
changeset 8775:2f4461f5ecb4
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/2f4461f5ecb4
user: kenji at grebe
date: Tue Jul 10 20:51:45 2012 +0900
description:
Removed functions deprecated in PHP-5.3.0
diffstat:
public_html/admin/install/configinfo.php | 2 +-
public_html/lib-common.php | 8 ++++----
system/databases/mssql.class.php | 6 +++---
system/lib-mbyte.php | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diffs (88 lines):
diff -r f7ed86427aaf -r 2f4461f5ecb4 public_html/admin/install/configinfo.php
--- a/public_html/admin/install/configinfo.php Wed Jul 11 11:26:24 2012 -0400
+++ b/public_html/admin/install/configinfo.php Tue Jul 10 20:51:45 2012 +0900
@@ -79,7 +79,7 @@
ob_end_clean();
} elseif (is_bool($value)) {
$value = ($value === false) ? 'false' : 'true';
- } elseif (eregi('[a-z]+html', $option)) {
+ } elseif (preg_match('/[a-z]+html/i', $option)) {
$value = htmlentities($value);
} elseif (!isset($value)) {
$value = ' ';
diff -r f7ed86427aaf -r 2f4461f5ecb4 public_html/lib-common.php
--- a/public_html/lib-common.php Wed Jul 11 11:26:24 2012 -0400
+++ b/public_html/lib-common.php Tue Jul 10 20:51:45 2012 +0900
@@ -6861,8 +6861,8 @@
switch( $interval )
{
case "y":
- list($year1, $month1, $day1) = split('-', date('Y-m-d', $date1));
- list($year2, $month2, $day2) = split('-', date('Y-m-d', $date2));
+ list($year1, $month1, $day1) = explode('-', date('Y-m-d', $date1));
+ list($year2, $month2, $day2) = explode('-', date('Y-m-d', $date2));
$time1 = (date('H',$date1)*3600) + (date('i',$date1)*60) + (date('s',$date1));
$time2 = (date('H',$date2)*3600) + (date('i',$date2)*60) + (date('s',$date2));
$diff = $year2 - $year1;
@@ -6879,8 +6879,8 @@
}
break;
case "m":
- list($year1, $month1, $day1) = split('-', date('Y-m-d', $date1));
- list($year2, $month2, $day2) = split('-', date('Y-m-d', $date2));
+ list($year1, $month1, $day1) = explode('-', date('Y-m-d', $date1));
+ list($year2, $month2, $day2) = explode('-', date('Y-m-d', $date2));
$time1 = (date('H',$date1)*3600) + (date('i',$date1)*60) + (date('s',$date1));
$time2 = (date('H',$date2)*3600) + (date('i',$date2)*60) + (date('s',$date2));
$diff = ($year2 * 12 + $month2) - ($year1 * 12 + $month1);
diff -r f7ed86427aaf -r 2f4461f5ecb4 system/databases/mssql.class.php
--- a/system/databases/mssql.class.php Wed Jul 11 11:26:24 2012 -0400
+++ b/system/databases/mssql.class.php Tue Jul 10 20:51:45 2012 +0900
@@ -367,7 +367,7 @@
$testSQL=substr($sql,0,$isIn);
$limitclause=trim($limitclause);
- eregi("limit ([^,]+),(.*)", $limitclause,$arrayStr);
+ preg_match('/limit ([^,]+),(.*)/i', $limitclause, $arrayStr);
$left=trim($arrayStr[1]);
$rightStr=trim($arrayStr[2]);
@@ -1047,7 +1047,7 @@
$rightStr=ltrim(substr($string,$startLoc+8,strlen($string)));
//eregi("\((.*),([^\)]+\))", $rightStr,$left);
- eregi("\(([^,]+),([^\)]+\))", $rightStr,$left);
+ preg_match("/\(([^,]+),([^\)]+\))/i", $rightStr, $left);
@@ -1073,7 +1073,7 @@
$replaceString='DATE_SUB(' . $firstParm . ',' . $left[2] . ')';
}
- $secondParmArray=split(" ",$secondParm);
+ $secondParmArray= explode(' ', $secondParm);
$intervalTime=$secondParmArray[1];
$typeForInterval=$secondParmArray[2];
if($intervalTime>0){
diff -r f7ed86427aaf -r 2f4461f5ecb4 system/lib-mbyte.php
--- a/system/lib-mbyte.php Wed Jul 11 11:26:24 2012 -0400
+++ b/system/lib-mbyte.php Tue Jul 10 20:51:45 2012 +0900
@@ -224,7 +224,7 @@
if ($mb_enabled) {
$result = mb_eregi($pattern, $str, $regs);
} else {
- $result = eregi($pattern, $str, $regs);
+ $result = preg_match('/' . $pattern . '/i', $str, $regs);
}
return $result;
@@ -240,7 +240,7 @@
if ($mb_enabled) {
$result = mb_eregi_replace($pattern, $replace, $str);
} else {
- $result = eregi_replace($pattern, $replace, $str);
+ $result = preg_replace('/' . $pattern . '/i', $replace, $str);
}
return $result;
More information about the geeklog-cvs
mailing list