Merge branch 'release-1.34'
This commit is contained in:
commit
8397ec3b9d
|
@ -10,7 +10,7 @@ SET @s = (SELECT IF(
|
||||||
AND column_name = 'ParentId'
|
AND column_name = 'ParentId'
|
||||||
) > 0,
|
) > 0,
|
||||||
"SELECT 'Column GroupId exists in Groups'",
|
"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;
|
PREPARE stmt FROM @s;
|
||||||
|
|
|
@ -3,7 +3,7 @@ SET @s = (SELECT IF(
|
||||||
AND table_name = 'Groups'
|
AND table_name = 'Groups'
|
||||||
AND column_name = 'MonitorIds'
|
AND column_name = 'MonitorIds'
|
||||||
) > 0,
|
) > 0,
|
||||||
"ALTER TABLE Groups MODIFY `MonitorIds` text NOT NULL",
|
"ALTER TABLE `Groups` MODIFY `MonitorIds` text NOT NULL",
|
||||||
"SELECT 'Groups no longer has MonitorIds'"
|
"SELECT 'Groups no longer has MonitorIds'"
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ function dbEscape( $string ) {
|
||||||
return $dbConn->quote($string);
|
return $dbConn->quote($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
function dbQuery($sql, $params=NULL) {
|
function dbQuery($sql, $params=NULL, $debug = false) {
|
||||||
global $dbConn;
|
global $dbConn;
|
||||||
if ( dbLog($sql, true) )
|
if ( dbLog($sql, true) )
|
||||||
return;
|
return;
|
||||||
|
@ -145,7 +145,7 @@ function dbQuery($sql, $params=NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( defined('ZM_DB_DEBUG') ) {
|
if ( defined('ZM_DB_DEBUG') or $debug ) {
|
||||||
ZM\Debug("SQL: $sql values:" . ($params?implode(',',$params):''));
|
ZM\Debug("SQL: $sql values:" . ($params?implode(',',$params):''));
|
||||||
}
|
}
|
||||||
$result = $dbConn->query($sql);
|
$result = $dbConn->query($sql);
|
||||||
|
@ -154,7 +154,7 @@ function dbQuery($sql, $params=NULL) {
|
||||||
return 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());
|
ZM\Debug('SQL: '.$sql.' '.($params?implode(',',$params):'').' rows: '.$result->rowCount());
|
||||||
}
|
}
|
||||||
} catch(PDOException $e) {
|
} catch(PDOException $e) {
|
||||||
|
|
Loading…
Reference in New Issue