X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FPage%2FSavedSearch.php;h=686eafb14240a9bee6ae0793aba23ce0476733ee;hb=867308b9118fa03058555e3bae6e67c9f3ddccd9;hp=72d890c746ded6ee70415fa3d17d83fd80049f44;hpb=c8115b6a584df05d3992d4ef86ac6fd5344a5e28;p=civicrm-core.git diff --git a/CRM/Contact/Page/SavedSearch.php b/CRM/Contact/Page/SavedSearch.php index 72d890c746..686eafb142 100644 --- a/CRM/Contact/Page/SavedSearch.php +++ b/CRM/Contact/Page/SavedSearch.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2019 | + | Copyright CiviCRM LLC (c) 2004-2020 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2019 + * @copyright CiviCRM LLC (c) 2004-2020 */ /** @@ -41,7 +41,7 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page { * * @var array */ - static $_links = NULL; + public static $_links = NULL; /** * Delete a saved search. @@ -70,14 +70,14 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page { * content of the parents run method */ public function browse() { - $rows = array(); + $rows = []; $savedSearch = new CRM_Contact_DAO_SavedSearch(); $savedSearch->is_active = 1; $savedSearch->selectAdd(); $savedSearch->selectAdd('id, form_values'); $savedSearch->find(); - $properties = array('id', 'name', 'description'); + $properties = ['id', 'name', 'description']; while ($savedSearch->fetch()) { // get name and description from group object $group = new CRM_Contact_DAO_Group(); @@ -85,7 +85,7 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page { if ($group->find(TRUE)) { $permissions = CRM_Contact_BAO_Group::checkPermission($group->id, TRUE); if (!CRM_Utils_System::isNull($permissions)) { - $row = array(); + $row = []; $row['name'] = $group->title; $row['description'] = $group->description; @@ -100,7 +100,7 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page { $row['action'] = CRM_Core_Action::formLink( self::links(), $action, - array('id' => $row['id']), + ['id' => $row['id']], ts('more'), FALSE, 'savedSearch.manage.action', @@ -148,20 +148,20 @@ class CRM_Contact_Page_SavedSearch extends CRM_Core_Page { $deleteExtra = ts('Do you really want to remove this Smart Group?'); - self::$_links = array( - CRM_Core_Action::VIEW => array( + self::$_links = [ + CRM_Core_Action::VIEW => [ 'name' => ts('Search'), 'url' => 'civicrm/contact/search/advanced', 'qs' => 'reset=1&force=1&ssID=%%id%%', 'title' => ts('Search'), - ), - CRM_Core_Action::DELETE => array( + ], + CRM_Core_Action::DELETE => [ 'name' => ts('Delete'), 'url' => 'civicrm/contact/search/saved', 'qs' => 'action=delete&id=%%id%%', 'extra' => 'onclick="return confirm(\'' . $deleteExtra . '\');"', - ), - ); + ], + ]; } return self::$_links; }