}
/**
- * Enables ONLY_FULL_GROUP_BY sql_mode as necessary..
+ * Re-enables ONLY_FULL_GROUP_BY sql_mode as necessary..
*/
- public static function enableFullGroupByMode() {
+ public static function reenableFullGroupByMode() {
$currentModes = CRM_Utils_SQL::getSqlModes();
if (CRM_Utils_SQL::supportsFullGroupBy() && !in_array('ONLY_FULL_GROUP_BY', $currentModes) && CRM_Utils_SQL::isGroupByModeInDefault()) {
$currentModes[] = 'ONLY_FULL_GROUP_BY';
// delete the export temp table and component table
$sql = "DROP TABLE IF EXISTS {$exportTempTable}";
CRM_Core_DAO::executeQuery($sql);
- CRM_Core_DAO::enableFullGroupByMode();
+ CRM_Core_DAO::reenableFullGroupByMode();
CRM_Utils_System::civiExit();
}
else {
- CRM_Core_DAO::enableFullGroupByMode();
+ CRM_Core_DAO::reenableFullGroupByMode();
throw new CRM_Core_Exception(ts('No records to export'));
}
}
}
CRM_Core_DAO::disableFullGroupByMode();
$dao->query($query);
- CRM_Core_DAO::enableFullGroupByMode();
+ CRM_Core_DAO::reenableFullGroupByMode();
$results = array();
while ($dao->fetch()) {
CRM_Core_DAO::disableFullGroupByMode();
}
$dao = CRM_Core_DAO::executeQuery($sql);
- CRM_Core_DAO::enableFullGroupByMode();
+ CRM_Core_DAO::reenableFullGroupByMode();
if (!is_array($rows)) {
$rows = array();
}