Merge pull request #6350 from PalanteJon/CRM-16939-4.6
[civicrm-core.git] / CRM / Contact / Page / SavedSearch.php
index 2f63b381ca55c6669fad5ecfa0c314767d06bcc8..08841d861c4abe8479716cde85da074c8315bed3 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Contact_Page_SavedSearch extends CRM_Core_Page {
 
   /**
-   * The action links that we need to display for the browse screen
+   * The action links that we need to display for the browse screen.
    *
    * @var array
-   * @static
    */
   static $_links = NULL;
 
   /**
    * Delete a saved search.
    *
-   * @param int $id - id of saved search
+   * @param int $id
+   *   Id of saved search.
    *
    * @return void
-   *
    */
   public function delete($id) {
     // first delete the group associated with this saved search
@@ -67,14 +66,13 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page {
     $savedSearch->id = $id;
     $savedSearch->is_active = 0;
     $savedSearch->save();
-    return;
   }
 
   /**
    * Browse all saved searches.
    *
-   * @return content of the parents run method
-   *
+   * @return mixed
+   *   content of the parents run method
    */
   public function browse() {
     $rows = array();
@@ -97,13 +95,13 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page {
           $row['name'] = $group->title;
           $row['description'] = $group->description;
 
-          $row['id']           = $savedSearch->id;
-          $formValues          = unserialize($savedSearch->form_values);
-          $query               = new CRM_Contact_BAO_Query($formValues);
+          $row['id'] = $savedSearch->id;
+          $formValues = unserialize($savedSearch->form_values);
+          $query = new CRM_Contact_BAO_Query($formValues);
           $row['query_detail'] = $query->qill();
 
-          $action        = array_sum(array_keys(self::links()));
-          $action        = $action & CRM_Core_Action::mask($permissions);
+          $action = array_sum(array_keys(self::links()));
+          $action = $action & CRM_Core_Action::mask($permissions);
           $row['action'] = CRM_Core_Action::formLink(
             self::links(),
             $action,
@@ -146,10 +144,10 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page {
   }
 
   /**
-   * Get action Links
+   * Get action Links.
    *
-   * @return array (reference) of action links
-   * @static
+   * @return array
+   *   (reference) of action links
    */
   public static function &links() {
 
@@ -174,4 +172,5 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page {
     }
     return self::$_links;
   }
+
 }