mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-07 02:11:26 +02:00
Several bug fixes
* Batch Manager no longer have a php error * Intro Graph display the actual week when it's monday * fix the "groups" reserved word * History is now summarize on the stats pag access * New piwigo no longer have PHP error due to stats.php
This commit is contained in:
@@ -137,6 +137,14 @@ function pwg_query($query)
|
||||
$query = preg_replace('/\brank\b/', '`rank`', $query);
|
||||
}
|
||||
|
||||
if (preg_match('/\bgroups\b/', $query))
|
||||
{
|
||||
// first we unescape what's already escaped (to avoid double escaping)
|
||||
$query = preg_replace('/`groups`/', 'rank', $query);
|
||||
// then we escape the keyword
|
||||
$query = preg_replace('/\bgroups\b/', '`rank`', $query);
|
||||
}
|
||||
|
||||
$start = microtime(true);
|
||||
($result = $mysqli->query($query)) or my_error($query, $conf['die_on_sql_error']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user