CRM-16761 - User message improvements.
[civicrm-core.git] / CRM / Event / Form / Search.php
index 15ad8ea86b10362745a4d136bb908e3fdcd433e0..92b7aea6c22ddfe7814fc235068be9a71993e099 100644 (file)
@@ -170,8 +170,8 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search {
     parent::buildQuickForm();
     $this->addSortNameField();
 
-    if (CRM_Core_Permission::check('access deleted contacts') and CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_undelete', NULL)) {
-      $this->addElement('checkbox', 'deleted_contacts', ts('Deleted contacts'));
+    if (CRM_Core_Permission::check('access deleted contacts') and Civi::settings()->get('contact_undelete')) {
+      $this->addElement('checkbox', 'deleted_contacts', ts('Search in Trash') . '<br />' . ts('(deleted contacts)'));
     }
 
     CRM_Event_BAO_Query::buildSearchForm($this);