From: eileen Date: Wed, 29 Jan 2020 04:18:46 +0000 (+1300) Subject: Remove some unused variables X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c4c13fcd810f947437f91c64357e43726d6ee4ef;p=civicrm-core.git Remove some unused variables phpcs correctly found these Eileens-MacBook-Pro:civicrm eileenmcnaughton$ phpcs --standard=DrupalPractice CRM/ACL FILE: /Users/eileenmcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/ACL/Form/WordPress/Permissions.php --------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------- 197 | WARNING | Unused global variable . --------------------------------------------------------------------------------------------------------------------- FILE: /Users/eileenmcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/ACL/Form/ACL.php --------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------------------------------- 97 | WARNING | Unused variable . --------------------------------------------------------------------------------------------------- FILE: /Users/eileenmcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/ACL/BAO/ACL.php -------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------------------------- 171 | WARNING | Unused variable . 172 | WARNING | Unused variable . 296 | WARNING | Unused variable . -------------------------------------------------------------------------------------------------- --- diff --git a/CRM/ACL/BAO/ACL.php b/CRM/ACL/BAO/ACL.php index 02e2b0db4f..29b1231940 100644 --- a/CRM/ACL/BAO/ACL.php +++ b/CRM/ACL/BAO/ACL.php @@ -168,8 +168,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL { $acl = self::getTableName(); $contact = CRM_Contact_BAO_Contact::getTableName(); - $c2g = CRM_Contact_BAO_GroupContact::getTableName(); - $group = CRM_Contact_BAO_Group::getTableName(); $query = " SELECT acl.* FROM $acl acl"; @@ -293,7 +291,6 @@ SELECT acl.* $aclER = CRM_ACL_DAO_EntityRole::getTableName(); $c2g = CRM_Contact_BAO_GroupContact::getTableName(); - $group = CRM_Contact_BAO_Group::getTableName(); $query = " SELECT acl.* FROM $acl acl diff --git a/CRM/ACL/Form/ACL.php b/CRM/ACL/Form/ACL.php index 2ffa52e376..de1665dcd4 100644 --- a/CRM/ACL/Form/ACL.php +++ b/CRM/ACL/Form/ACL.php @@ -94,8 +94,6 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form { return; } - $attributes = CRM_Core_DAO::getAttribute('CRM_ACL_DAO_ACL'); - $this->add('text', 'name', ts('Description'), CRM_Core_DAO::getAttribute('CRM_ACL_DAO_ACL', 'name'), TRUE); $operations = ['' => ts('- select -')] + CRM_ACL_BAO_ACL::operation(); diff --git a/CRM/ACL/Form/WordPress/Permissions.php b/CRM/ACL/Form/WordPress/Permissions.php index f19ff16c6a..4c5f133006 100644 --- a/CRM/ACL/Form/WordPress/Permissions.php +++ b/CRM/ACL/Form/WordPress/Permissions.php @@ -194,7 +194,6 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form { * civicrm permissions */ public static function getPermissionArray($descriptions = FALSE) { - global $civicrm_root; $permissions = CRM_Core_Permission::basicPermissions(FALSE, $descriptions);