public static function checkLoggingSupport(&$value, $fieldSpec) {
$domain = new CRM_Core_DAO_Domain();
$domain->find(TRUE);
- $disabled = $domain->locales || !(CRM_Core_DAO::checkTriggerViewPermission(FALSE));
- if ($disabled && $value) {
- throw new API_Exception("In order to use this functionality, the installation's database user must have privileges to create triggers (in MySQL 5.0 – and in MySQL 5.1 if binary logging is enabled – this means the SUPER privilege). This install either does not seem to have the required privilege enabled. This functionality cannot be enabled on multilingual installations.");
+ if (!(CRM_Core_DAO::checkTriggerViewPermission(FALSE)) && $value) {
+ throw new API_Exception("In order to use this functionality, the installation's database user must have privileges to create triggers (in MySQL 5.0 – and in MySQL 5.1 if binary logging is enabled – this means the SUPER privilege). This install either does not seem to have the required privilege enabled.");
}
return TRUE;
}
if (!isset($columnsOf[$table]) || $force) {
$errorScope = CRM_Core_TemporaryErrorScope::ignoreException();
- $dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from");
+ $dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
if (is_a($dao, 'DB_Error')) {
return array();
}
* Create a log table with schema mirroring the given table’s structure and seeding it with the given table’s contents.
*/
private function createLogTableFor($table) {
- $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table");
+ $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
$dao->fetch();
$query = $dao->Create_Table;
$query = self::fixTimeStampAndNotNullSQL($query);
$query = preg_replace("/^\) /m", "$cols\n) ", $query);
- CRM_Core_DAO::executeQuery($query);
+ CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
$columns = implode(', ', $this->columnsOf($table));
- CRM_Core_DAO::executeQuery("INSERT INTO `{$this->db}`.log_$table ($columns, log_conn_id, log_user_id, log_action) SELECT $columns, CONNECTION_ID(), @civicrm_user_id, 'Initialization' FROM {$table}");
+ CRM_Core_DAO::executeQuery("INSERT INTO `{$this->db}`.log_$table ($columns, log_conn_id, log_user_id, log_action) SELECT $columns, CONNECTION_ID(), @civicrm_user_id, 'Initialization' FROM {$table}", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
$this->tables[] = $table;
$this->logs[$table] = "log_$table";