mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Feature 511 : add support for sqlite database engine
Using session_write_close function when session handler use database because write is called after object destruction. git-svn-id: http://piwigo.org/svn/trunk@4781 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -289,4 +289,24 @@ WHERE id IN (' . implode(',',$page['items']) .')';
|
||||
}
|
||||
pwg_debug('end initialize_calendar');
|
||||
}
|
||||
|
||||
/*
|
||||
* callback to sort array with date comparaison
|
||||
*
|
||||
**/
|
||||
function date_compare(&$a, &$b)
|
||||
{
|
||||
$parts = explode('-', $a);
|
||||
foreach ($parts as &$p) {
|
||||
$p = (int)$p;
|
||||
}
|
||||
$a = implode('-', $parts);
|
||||
$parts = explode('-', $b);
|
||||
foreach ($parts as &$p) {
|
||||
$p = (int)$p;
|
||||
}
|
||||
$b = implode('-', $parts);
|
||||
|
||||
return strcmp($a, $b);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user