Skip to content
Snippets Groups Projects
Commit 36b410f9 authored by Prasad's avatar Prasad
Browse files

Fixes to work with STRICT_TRANS_TABLES sql_mode

parent 7ba54539
No related branches found
No related tags found
No related merge requests found
......@@ -750,6 +750,7 @@ class ADODB_DataDict {
if ($fdefts) {
if (substr($this->connection->databaseType,0,5) == 'mysql') {
$ftype = 'TIMESTAMP';
$fdefault = ' CURRENT_TIMESTAMP'; /* STRICT_TRANS_TABLES fix */
} else {
$fdefault = $this->connection->sysTimeStamp;
}
......
......@@ -175,10 +175,10 @@ class Vtiger_FieldBasic {
$adb->pquery("INSERT INTO vtiger_field (tabid, fieldid, columnname, tablename, generatedtype,
uitype, fieldname, fieldlabel, readonly, presence, defaultvalue, maximumlength, sequence,
block, displaytype, typeofdata, quickcreate, quickcreatesequence, info_type, helpinfo, summaryfield)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", Array($this->getModuleId(), $this->id, $this->column, $this->table, $this->generatedtype,
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", Array($this->getModuleId(), $this->id, $this->column, $this->table, intval($this->generatedtype),
$this->uitype, $this->name, $this->label, $this->readonly, $this->presence, $this->defaultvalue,
$this->maximumlength, $this->sequence, $this->getBlockId(), $this->displaytype, $this->typeofdata,
$this->quickcreate, $this->quicksequence, $this->info_type, $this->helpinfo, $this->summaryfield));
intval($this->quickcreate), intval($this->quicksequence), $this->info_type, $this->helpinfo, intval($this->summaryfield)));
// Set the field status for mass-edit (if set)
$adb->pquery('UPDATE vtiger_field SET masseditable=? WHERE fieldid=?', Array($this->masseditable, $this->id));
......@@ -305,4 +305,4 @@ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", Array($this->getModuleId(),
Vtiger_Utils::Log($message, $delim);
}
}
?>
\ No newline at end of file
?>
......@@ -112,7 +112,7 @@ class Vtiger_Link {
$uniqueid = self::__getUniqueId();
$sql = 'INSERT INTO vtiger_links (linkid,tabid,linktype,linklabel,linkurl,linkicon,'.
'sequence';
$params = Array($uniqueid, $tabid, $type, $label, $url, $iconpath, $sequence);
$params = Array($uniqueid, $tabid, $type, $label, $url, $iconpath, intval($sequence));
if(!empty($handlerInfo)) {
$sql .= (', handler_path, handler_class, handler');
$params[] = $handlerInfo['path'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment