Merge pull request #5760 from sudhabisht/SMSissue
[civicrm-core.git] / CRM / Core / Smarty.php
index 986d3ef8e6cf4ac1edbc6fce02b1ceeb179b0e29..7553d4ae86da63cf81051811312320b20b67307e 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -78,7 +78,7 @@ class CRM_Core_Smarty extends Smarty {
   private $backupFrames = array();
 
   /**
-   * Class constructor
+   * Class constructor.
    *
    * @return CRM_Core_Smarty
    */
@@ -117,8 +117,8 @@ class CRM_Core_Smarty extends Smarty {
 
     $customPluginsDir = NULL;
     if (isset($config->customPHPPathDir)) {
-      $customPluginsDir =
-        $config->customPHPPathDir . DIRECTORY_SEPARATOR .
+      $customPluginsDir
+        $config->customPHPPathDir . DIRECTORY_SEPARATOR .
         'CRM' . DIRECTORY_SEPARATOR .
         'Core' . DIRECTORY_SEPARATOR .
         'Smarty' . DIRECTORY_SEPARATOR .
@@ -141,20 +141,6 @@ class CRM_Core_Smarty extends Smarty {
     $this->assign_by_ref('config', $config);
     $this->assign_by_ref('session', $session);
 
-    // check default editor and assign to template
-    $defaultWysiwygEditor = $session->get('defaultWysiwygEditor');
-    if (!$defaultWysiwygEditor && !CRM_Core_Config::isUpgradeMode()) {
-      $defaultWysiwygEditor = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
-        'editor_id'
-      );
-      // For logged-in users, store it in session to reduce db calls
-      if ($session->get('userID')) {
-        $session->set('defaultWysiwygEditor', $defaultWysiwygEditor);
-      }
-    }
-
-    $this->assign('defaultWysiwygEditor', $defaultWysiwygEditor);
-
     global $tsLocale;
     $this->assign('tsLocale', $tsLocale);
 
@@ -325,4 +311,5 @@ class CRM_Core_Smarty extends Smarty {
     }
     return $this;
   }
+
 }