* More PHP 5.3.0 compat (split()).
This commit is contained in:
parent
6407727fe6
commit
275589423a
@ -1432,7 +1432,7 @@ class XML_RPC_Message extends XML_RPC_Base
|
||||
$r = new XML_RPC_Response($v);
|
||||
}
|
||||
}
|
||||
$r->hdrs = split("\r?\n", $XML_RPC_xh[$parser]['ha'][1]);
|
||||
$r->hdrs = preg_split("@\r?\n@", $XML_RPC_xh[$parser]['ha'][1]);
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ Version 1.5 ()
|
||||
|
||||
* Allow to define sort order for search-results (garvinhicking)
|
||||
|
||||
* More PHP 5.3.0 compat (split()).
|
||||
|
||||
-- beta1 release
|
||||
|
||||
* PHP 5.3.0 compatibility without E_WARNING triggers (garvinhicking)
|
||||
|
@ -95,7 +95,7 @@ function serendipity_db_limit($start, $offset) {
|
||||
* @return SQL string containing a full LIMIT statement
|
||||
*/
|
||||
function serendipity_db_limit_sql($limitstring) {
|
||||
$limit_split = split(',', $limitstring);
|
||||
$limit_split = explode(',', $limitstring);
|
||||
if (count($limit_split) > 1) {
|
||||
$limit = ' LIMIT ' . $limit_split[0] . ' OFFSET ' . $limit_split[1];
|
||||
} else {
|
||||
|
@ -100,7 +100,7 @@ function serendipity_db_limit($start, $offset) {
|
||||
* @return SQL string containing a full LIMIT statement
|
||||
*/
|
||||
function serendipity_db_limit_sql($limitstring) {
|
||||
$limit_split = split(',', $limitstring);
|
||||
$limit_split = explode(',', $limitstring);
|
||||
if (count($limit_split) > 1) {
|
||||
$limit = ' LIMIT ' . $limit_split[0] . ' OFFSET ' . $limit_split[1];
|
||||
} else {
|
||||
|
@ -388,7 +388,7 @@ function serendipity_db_limit_sql($limitstring) {
|
||||
return ' LIMIT ' . $limitstring;
|
||||
case "postgresql":
|
||||
$limit;
|
||||
$limit_split = split(',', $limitstring);
|
||||
$limit_split = explode(',', $limitstring);
|
||||
if (count($limit_split) > 1) {
|
||||
$limit = ' LIMIT ' . $limit_split[0] . ' OFFSET ' . $limit_split[1];
|
||||
} else {
|
||||
|
@ -571,7 +571,7 @@ class serendipity_event_statistics extends serendipity_event
|
||||
function updatestats($action) {
|
||||
global $serendipity;
|
||||
|
||||
list($year, $month, $day) = split('-', date('Y-m-d'));
|
||||
list($year, $month, $day) = explode('-', date('Y-m-d'));
|
||||
$sql = serendipity_db_query("SELECT COUNT(year) AS result FROM {$serendipity['dbPrefix']}visitors_count WHERE year='$year' AND month='$month' AND day='$day'", true);
|
||||
|
||||
$sql_hit_update = "UPDATE {$serendipity['dbPrefix']}visitors_count SET hits = hits+1 WHERE year='$year' AND month='$month' AND day='$day'";
|
||||
@ -662,7 +662,7 @@ class serendipity_event_statistics extends serendipity_event
|
||||
function statistics_getdailystats($day, $amount) {
|
||||
global $serendipity;
|
||||
|
||||
list($year, $month) = split('[-]', date("Y-m"));
|
||||
list($year, $month) = explode('-', date("Y-m"));
|
||||
if ($day > 0 && $day <32) {
|
||||
$sql = "SELECT SUM(visits) AS dailyvisit FROM {$serendipity['dbPrefix']}visitors_count WHERE day";
|
||||
for ($i=1; $i<32; $i++) {
|
||||
@ -720,7 +720,7 @@ class serendipity_event_statistics extends serendipity_event
|
||||
|
||||
// ---------------QUERIES for Viewing statistics ----------------------------------------------
|
||||
$day = date('Y-m-d');
|
||||
list($year, $month, $day) = split('-', $day);
|
||||
list($year, $month, $day) = explode('-', $day);
|
||||
|
||||
$visitors_count_firstday = serendipity_db_query("SELECT day FROM {$serendipity['dbPrefix']}visitors ORDER BY counter_id ASC LIMIT 1", true);
|
||||
$visitors_count_today = serendipity_db_query("SELECT visits FROM {$serendipity['dbPrefix']}visitors_count WHERE year = '".$year."' AND month = '".$month."' AND day = '".$day."'", true);
|
||||
|
@ -190,7 +190,7 @@ class serendipity_plugin_statistics extends serendipity_plugin
|
||||
|
||||
if (!file_exists($cachef) || filesize($cachef) == 0 || filemtime($cachef) < (time() - $cachetime)) {
|
||||
// Create statistics
|
||||
list($year, $month, $day) = split('-', date('Y-m-d'));
|
||||
list($year, $month, $day) = explode('-', date('Y-m-d'));
|
||||
$lastmonday = date('Ymd', strtotime('last monday'));
|
||||
$nextsunday = date('Ymd', strtotime('next sunday'));
|
||||
if (date('w', strtotime('today') ) == "1" ) { // now it is monday
|
||||
|
Loading…
x
Reference in New Issue
Block a user