forked from Wavyzz/dolibarr
Fix some warnings
This commit is contained in:
@@ -56,6 +56,8 @@ $type = 'member';
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$modulepart = GETPOST('modulepart', 'aZ09');
|
||||
|
||||
$reg = array();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@@ -53,6 +53,8 @@ $MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB');
|
||||
// List of available colors
|
||||
$colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', 'A4A4A5');
|
||||
|
||||
$reg = array();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
||||
@@ -572,7 +572,7 @@ function run_sql($sqlfile, $silent = 1, $entity = 0, $usesavepoint = 1, $handler
|
||||
* Delete a constant
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $name Name of constant or rowid of line
|
||||
* @param int|string $name Name of constant or rowid of line
|
||||
* @param int $entity Multi company id, -1 for all entities
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*
|
||||
@@ -602,8 +602,8 @@ function dolibarr_del_const($db, $name, $entity = 1)
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql .= " WHERE (".$db->decrypt('name')." = '".$db->escape($name)."'";
|
||||
if (is_numeric($name)) {
|
||||
$sql .= " WHERE (".$db->decrypt('name')." = '".$db->escape((string) $name)."'";
|
||||
if (is_numeric($name)) { // This case seems used in the setup of constant page only, to delete a line.
|
||||
$sql .= " OR rowid = ".((int) $name);
|
||||
}
|
||||
$sql .= ")";
|
||||
|
||||
Reference in New Issue
Block a user