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:
Zacharie
2020-06-16 12:20:04 +02:00
parent cb1d7522d8
commit 2e70ebf777
4 changed files with 27 additions and 6 deletions
+8
View File
@@ -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']);