Merge branch 'release-1.34'

This commit is contained in:
Isaac Connor 2020-12-01 14:28:10 -05:00
commit 8397ec3b9d
3 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ SET @s = (SELECT IF(
AND column_name = 'ParentId'
) > 0,
"SELECT 'Column GroupId exists in Groups'",
"ALTER TABLE Groups ADD `ParentId` int(10) unsigned AFTER `Name`"
"ALTER TABLE `Groups` ADD `ParentId` int(10) unsigned AFTER `Name`"
));
PREPARE stmt FROM @s;

View File

@ -3,7 +3,7 @@ SET @s = (SELECT IF(
AND table_name = 'Groups'
AND column_name = 'MonitorIds'
) > 0,
"ALTER TABLE Groups MODIFY `MonitorIds` text NOT NULL",
"ALTER TABLE `Groups` MODIFY `MonitorIds` text NOT NULL",
"SELECT 'Groups no longer has MonitorIds'"
));

View File

@ -128,7 +128,7 @@ function dbEscape( $string ) {
return $dbConn->quote($string);
}
function dbQuery($sql, $params=NULL) {
function dbQuery($sql, $params=NULL, $debug = false) {
global $dbConn;
if ( dbLog($sql, true) )
return;
@ -145,7 +145,7 @@ function dbQuery($sql, $params=NULL) {
return NULL;
}
} else {
if ( defined('ZM_DB_DEBUG') ) {
if ( defined('ZM_DB_DEBUG') or $debug ) {
ZM\Debug("SQL: $sql values:" . ($params?implode(',',$params):''));
}
$result = $dbConn->query($sql);
@ -154,7 +154,7 @@ function dbQuery($sql, $params=NULL) {
return NULL;
}
}
if ( defined('ZM_DB_DEBUG') ) {
if ( defined('ZM_DB_DEBUG') or $debug ) {
ZM\Debug('SQL: '.$sql.' '.($params?implode(',',$params):'').' rows: '.$result->rowCount());
}
} catch(PDOException $e) {