// test for create view and trigger permissions and if allowed, add the option to go multilingual
// and logging
// I'm not sure why we use the getStaticProperty for an error, rather than checking for DB_Error
- CRM_Core_TemporaryErrorScope::ignoreException();
$dao = new CRM_Core_DAO();
if ($view) {
$result = $dao->query('CREATE OR REPLACE VIEW civicrm_domain_view AS SELECT * FROM civicrm_domain');
private function columnsOf($table, $force = FALSE) {
if ($force || !isset(\Civi::$statics[__CLASS__]['columnsOf'][$table])) {
$from = (substr($table, 0, 4) == 'log_') ? "`{$this->db}`.$table" : $table;
- CRM_Core_TemporaryErrorScope::ignoreException();
$dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from", [], TRUE, NULL, FALSE, FALSE);
if (is_a($dao, 'DB_Error')) {
return [];
$dao = new CRM_Contact_DAO_Contact();
$civiDB = $dao->_database;
}
- CRM_Core_TemporaryErrorScope::ignoreException();
+
// NOTE: W.r.t Performance using one query to find all details and storing in static array is much faster
// than firing query for every given table.
$query = "