CRM-20157 code cleanup, more unused variables
authoreileen <emcnaughton@wikimedia.org>
Mon, 27 Feb 2017 22:06:57 +0000 (11:06 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 27 Feb 2017 22:06:57 +0000 (11:06 +1300)
CRM/Contact/Form/Merge.php

index ba90bf7ec00c4a697b96f250558574f24b7ea5bb..da1d5544915bfdd3df95292c6502644e1dd61dc7 100644 (file)
@@ -109,7 +109,6 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $config = CRM_Core_Config::singleton();
     $config->doNotResetCache = 1;
 
-    $viewUser = CRM_Core_Permission::check('access user profiles');
     $mainUfId = CRM_Core_BAO_UFMatch::getUFId($this->_cid);
     $mainUser = NULL;
     if ($mainUfId) {
@@ -167,8 +166,6 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $cmsUser = ($mainUfId && $otherUfId) ? TRUE : FALSE;
     $this->assign('user', $cmsUser);
 
-    $session = CRM_Core_Session::singleton();
-
     $rowsElementsAndInfo = CRM_Dedupe_Merger::getRowsElementsAndInfo($this->_cid, $this->_oid);
     $main = $this->_mainDetails = $rowsElementsAndInfo['main_details'];
     $other = $this->_otherDetails = $rowsElementsAndInfo['other_details'];
@@ -225,7 +222,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     }
 
     $this->assign('rel_tables', $rowsElementsAndInfo['rel_tables']);
-    $this->assign('userContextURL', $session->readUserContext());
+    $this->assign('userContextURL', CRM_Core_Session::singleton()->readUserContext());
   }
 
   public function addRules() {