+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2020
*/
/**
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* Delete a saved search.
* 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();
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;
$row['action'] = CRM_Core_Action::formLink(
self::links(),
$action,
- array('id' => $row['id']),
+ ['id' => $row['id']],
ts('more'),
FALSE,
'savedSearch.manage.action',
$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;
}