Merge pull request #4961 from pratikshad/core-bugs
[civicrm-core.git] / CRM / Contact / Form / Search / Custom.php
index eabfe7dce82b105ba68677e7079b69e5f53fefb5..ad8e178bb483f864a232992b6fe0ae3728e94de5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -49,7 +49,7 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
       $this->_customSearchID,
       $this->_customSearchClass,
       $formValues
-    ) = CRM_Contact_BAO_SearchCustom::details($csID, $ssID, $gID);
+      ) = CRM_Contact_BAO_SearchCustom::details($csID, $ssID, $gID);
 
     if (!$this->_customSearchID) {
       CRM_Core_Error::fatal('Could not get details for custom search.');
@@ -64,11 +64,14 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
     }
 
     // set breadcrumb to return to Custom Search listings page
-    $breadCrumb = array(array('title' => ts('Custom Searches'),
+    $breadCrumb = array(
+      array(
+        'title' => ts('Custom Searches'),
         'url' => CRM_Utils_System::url('civicrm/contact/search/custom/list',
           'reset=1'
         ),
-      ));
+      ),
+    );
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
 
     // use the custom selector
@@ -80,11 +83,12 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
     parent::preProcess();
 
     // instantiate the new class
-    $this->_customClass = new $this->_customSearchClass( $this->_formValues );
+    $this->_customClass = new $this->_customSearchClass($this->_formValues);
 
     // CRM-12747
     if (isset($this->_customClass->_permissionedComponent) &&
-      !self::isPermissioned($this->_customClass->_permissionedComponent)) {
+      !self::isPermissioned($this->_customClass->_permissionedComponent)
+    ) {
       CRM_Utils_System::permissionDenied();
     }
   }
@@ -95,20 +99,20 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
    *
    * access        public
    *
-   * @return array reference to the array of default values
-   *
+   * @return array
+   *   reference to the array of default values
    */
   /**
    * @return array
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     if (method_exists($this->_customSearchClass, 'setDefaultValues')) {
       return $this->_customClass->setDefaultValues();
     }
     return $this->_formValues;
   }
 
-  function buildQuickForm() {
+  public function buildQuickForm() {
     $this->_customClass->buildForm($this);
 
     parent::buildQuickForm();
@@ -118,12 +122,11 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
    * Use the form name to create the tpl file name
    *
    * @return string
-   * @access public
    */
   /**
    * @return string
    */
-  function getTemplateFileName() {
+  public function getTemplateFileName() {
 
     $ext = CRM_Extension_System::singleton()->getMapper();
 
@@ -137,7 +140,7 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
     return $fileName ? $fileName : parent::getTemplateFileName();
   }
 
-  function postProcess() {
+  public function postProcess() {
     $this->set('isAdvanced', '3');
     $this->set('isCustom', '1');
 
@@ -160,7 +163,6 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
    * Return a descriptive name for the page, used in wizard header
    *
    * @return string
-   * @access public
    */
   /**
    * @return string
@@ -174,7 +176,7 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
    *
    * @return bool
    */
-  function isPermissioned($components) {
+  public function isPermissioned($components) {
     if (empty($components)) {
       return TRUE;
     }