From: eileen Date: Thu, 13 Oct 2016 16:04:56 +0000 (+0100) Subject: Minor in-passing tidy-ups X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e8a0f9e01f917a75527b326f3fe3c65093f25ce4;p=civicrm-core.git Minor in-passing tidy-ups --- diff --git a/CRM/Contact/BAO/Contact/Permission.php b/CRM/Contact/BAO/Contact/Permission.php index 7098ee9138..befee1347e 100644 --- a/CRM/Contact/BAO/Contact/Permission.php +++ b/CRM/Contact/BAO/Contact/Permission.php @@ -63,7 +63,7 @@ class CRM_Contact_BAO_Contact_Permission { // if the general permission is there, all good if (CRM_Core_Permission::check('access deleted contacts')) { - // if user can access delted contacts -> fine + // if user can access deleted contacts -> fine return $contact_ids; } else { @@ -534,7 +534,6 @@ SELECT second_degree_relationship.contact_id_{$second_direction['to']} AS contac while ($result->fetch()) { $result_set[(int) $result->contact_id] = TRUE; } - $keys = array_keys($result_set); return array_keys($result_set); } diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index db90c66280..94fa086ec7 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -507,11 +507,9 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { * driven by the wizard framework */ - $this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', - CRM_Core_DAO::$_nullObject - ); + $this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean'); - $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', CRM_Core_DAO::$_nullObject); + $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean'); $this->_groupID = CRM_Utils_Request::retrieve('gid', 'Positive', $this); $this->_amtgID = CRM_Utils_Request::retrieve('amtgID', 'Positive', $this); $this->_ssID = CRM_Utils_Request::retrieve('ssID', 'Positive', $this); diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index a8e1aa30fc..563f2a9b11 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -542,7 +542,6 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se * the total number of rows for this action */ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { - $config = CRM_Core_Config::singleton(); if (($output == CRM_Core_Selector_Controller::EXPORT || $output == CRM_Core_Selector_Controller::SCREEN @@ -915,7 +914,6 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se * @param $rows */ public function addActions(&$rows) { - $config = CRM_Core_Config::singleton(); $permissions = array(CRM_Core_Permission::getPermission()); if (CRM_Core_Permission::check('delete contacts')) { @@ -925,9 +923,6 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se // mask value to hide map link if there are not lat/long $mapMask = $mask & 4095; - // mask value to hide map link if there are not lat/long - $mapMask = $mask & 4095; - // get permissions on an individual level (CRM-12645) $can_edit_list = CRM_Contact_BAO_Contact_Permission::allowList(array_keys($rows), CRM_Core_Permission::EDIT);