From: Seamus Lee Date: Tue, 1 May 2018 04:20:36 +0000 (+1000) Subject: Rename function enableFullGroupByMode to be reenableFullGroupByMode to be more explii... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2f68ef20839a19be98290e7ab75e7a549210f58d;p=civicrm-core.git Rename function enableFullGroupByMode to be reenableFullGroupByMode to be more expliict about what the function does --- diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 294c1e4f72..d7e148051e 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -177,9 +177,9 @@ class CRM_Core_DAO extends DB_DataObject { } /** - * 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'; diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 9b1523e1ad..f01ee31260 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -1007,11 +1007,11 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c // 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')); } } diff --git a/CRM/Mailing/Event/BAO/TrackableURLOpen.php b/CRM/Mailing/Event/BAO/TrackableURLOpen.php index ba933218e1..6cd04732e6 100644 --- a/CRM/Mailing/Event/BAO/TrackableURLOpen.php +++ b/CRM/Mailing/Event/BAO/TrackableURLOpen.php @@ -366,7 +366,7 @@ class CRM_Mailing_Event_BAO_TrackableURLOpen extends CRM_Mailing_Event_DAO_Track } CRM_Core_DAO::disableFullGroupByMode(); $dao->query($query); - CRM_Core_DAO::enableFullGroupByMode(); + CRM_Core_DAO::reenableFullGroupByMode(); $results = array(); while ($dao->fetch()) { diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 7d8454fea4..b66fc3599c 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -2962,7 +2962,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND CRM_Core_DAO::disableFullGroupByMode(); } $dao = CRM_Core_DAO::executeQuery($sql); - CRM_Core_DAO::enableFullGroupByMode(); + CRM_Core_DAO::reenableFullGroupByMode(); if (!is_array($rows)) { $rows = array(); }