Merge pull request #4003 from civicrm/4.5
[civicrm-core.git] / CRM / Admin / Page / LabelFormats.php
index 8c25975a4678a0ebd6c60fec74bde253153894b0..5fe0483105b15aa81017ff9aa8917d2f6be5d638 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
  | Copyright (C) 2011 Marty Wright                                    |
  | Licensed to CiviCRM under the Academic Free License version 3.0.   |
@@ -29,7 +29,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -39,6 +39,8 @@
  */
 class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
 
+  public $useLivePageJS = TRUE;
+
   /**
    * The action links that we need to display for the browse screen
    *
@@ -110,6 +112,8 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
   /**
    * Get user context.
    *
+   * @param null $mode
+   *
    * @return string user context.
    */
   function userContext($mode = NULL) {
@@ -119,6 +123,8 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
   /**
    * Browse all Label Format settings.
    *
+   * @param null $action
+   *
    * @return void
    * @access public
    * @static
@@ -131,7 +137,7 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic {
     // Add action links to each of the Label Formats
     foreach ($labelFormatList as & $format) {
       $action = array_sum(array_keys($this->links()));
-      if (CRM_Utils_Array::value('is_reserved', $format)) {
+      if (!empty($format['is_reserved'])) {
         $action -= CRM_Core_Action::DELETE;
       }