CRM-19372 allow payment processors to define an array of accepted credit card types
[civicrm-core.git] / CRM / Core / Page.php
index a05784288c78b593b6a84f2132bf11692b546326..a60d276c5187c677e2981b6a8cc672e0c85372a6 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,9 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 
 /**
@@ -161,12 +159,9 @@ class CRM_Core_Page {
   }
 
   /**
-   * This function takes care of all the things common to all
-   * pages. This typically involves assigning the appropriate smarty
-   * variable :)
+   * This function takes care of all the things common to all pages.
    *
-   * @return void|string
-   *   The content generated by running this page
+   * This typically involves assigning the appropriate smarty variables :)
    */
   public function run() {
     if ($this->_embedded) {
@@ -222,9 +217,7 @@ class CRM_Core_Page {
     // Intermittent alert to admins
     CRM_Utils_Check::singleton()->showPeriodicAlerts();
 
-    if ($this->useLivePageJS &&
-      CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajaxPopupsEnabled', NULL, TRUE)
-    ) {
+    if ($this->useLivePageJS && Civi::settings()->get('ajaxPopupsEnabled')) {
       CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header');
     }
 
@@ -248,9 +241,6 @@ class CRM_Core_Page {
    * @param string|array $name name of the variable or an assoc array of name/value pairs
    * @param mixed $value
    *   Value of the variable if string.
-   *
-   *
-   * @return void
    */
   public function set($name, $value = NULL) {
     self::$_session->set($name, $value, $this->_name);
@@ -272,9 +262,7 @@ class CRM_Core_Page {
    *
    * @param string $var
    * @param mixed $value
-   *   Value of varaible.
-   *
-   * @return void
+   *   Value of variable.
    */
   public function assign($var, $value = NULL) {
     self::$_template->assign($var, $value);
@@ -285,9 +273,7 @@ class CRM_Core_Page {
    *
    * @param string $var
    * @param mixed $value
-   *   (reference) value of varaible.
-   *
-   * @return void
+   *   (reference) value of variable.
    */
   public function assign_by_ref($var, &$value) {
     self::$_template->assign_by_ref($var, $value);
@@ -318,9 +304,6 @@ class CRM_Core_Page {
 
   /**
    * Destroy all the session state of this page.
-   *
-   *
-   * @return void
    */
   public function reset() {
     self::$_session->resetScope($this->_name);
@@ -365,8 +348,6 @@ class CRM_Core_Page {
    * Setter for embedded.
    *
    * @param bool $embedded
-   *
-   * @return void
    */
   public function setEmbedded($embedded) {
     $this->_embedded = $embedded;
@@ -386,8 +367,6 @@ class CRM_Core_Page {
    * Setter for print.
    *
    * @param bool $print
-   *
-   * @return void
    */
   public function setPrint($print) {
     $this->_print = $print;