mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Fix bug 1717 : SQLite: access failure on Admin > Tools > History
hour function doesn't exists git-svn-id: http://piwigo.org/svn/trunk@6463 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -55,6 +55,7 @@ function pwg_db_connect($host, $user, $password, $database)
|
||||
}
|
||||
|
||||
$link->createFunction('now', 'pwg_now', 0);
|
||||
$link->createFunction('hour', 'pwg_hour', 1);
|
||||
$link->createFunction('unix_timestamp', 'pwg_unix_timestamp', 0);
|
||||
$link->createFunction('md5', 'md5', 1);
|
||||
$link->createFunction('if', 'pwg_if', 3);
|
||||
@@ -582,6 +583,11 @@ function pwg_now()
|
||||
return date('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
function pwg_hour($datetime)
|
||||
{
|
||||
return strftime('%H', $datetime);
|
||||
}
|
||||
|
||||
function pwg_unix_timestamp()
|
||||
{
|
||||
return time();
|
||||
|
||||
Reference in New Issue
Block a user