Merge pull request #4115 from totten/4.5-dm-ign
[civicrm-core.git] / CRM / Mailing / PseudoConstant.php
index 0a36721210ac5ad891d35391c6b65994a5dea31c..5e92f7f63907b4f07524228c051905347c58f812 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
  */
 class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
 
-  /**
-   * mailing approval status
-   * @var array
-   * @static
-   */
-  private static $approvalStatus;
-
   /**
    * mailing templates
    * @var array
@@ -161,6 +154,8 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
    *
    * @access public
    *
+   * @param null $mode
+   *
    * @return array - array reference of all mailing templates if any
    * @static
    */
@@ -180,24 +175,6 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
     return self::$completed;
   }
 
-  /**
-   * Get all mail approval status.
-   *
-   * The static array approvalStatus is returned
-   *
-   * @access public
-   * @static
-   *
-   * @return array - array reference of all mail approval statuses
-   *
-   */
-  public static function &approvalStatus() {
-    if (!self::$approvalStatus) {
-      self::$approvalStatus = CRM_Core_OptionGroup::values('mail_approval_status');
-    }
-    return self::$approvalStatus;
-  }
-
   /**
    * Labels for advanced search against mailing summary.
    *
@@ -231,15 +208,14 @@ class CRM_Mailing_PseudoConstant extends CRM_Core_PseudoConstant {
 
   /**
    * Flush given pseudoconstant so it can be reread from db
-   * nex time it's requested.
+   * next time it's requested.
    *
    * @access public
    * @static
    *
-   * @param boolean $name pseudoconstant to be flushed
-   *
+   * @param bool|string $name pseudoconstant to be flushed
    */
-  public static function flush($name) {
+  public static function flush($name = 'template') {
    if (isset(self::$$name)) {
       self::$$name = NULL;
     }