Remove reference to non-existent global variable
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 19 Feb 2010 18:22:47 +0000 (11:22 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 19 Feb 2010 18:23:16 +0000 (11:23 -0700)
framework/Text_Filter/lib/Horde/Text/Filter/Html2text.php
framework/Text_Filter/lib/Horde/Text/Filter/Text2html.php

index 46be644..a548dd9 100644 (file)
@@ -36,7 +36,7 @@ class Horde_Text_Filter_Html2text extends Horde_Text_Filter_Base
      * @var array
      */
     protected $_params = array(
-        'charset' => null,
+        'charset' => 'ISO-8859-1',
         'width' => 70,
         'wrap' => true
     );
@@ -50,12 +50,7 @@ class Horde_Text_Filter_Html2text extends Horde_Text_Filter_Base
      */
     public function preProcess($text)
     {
-        if (is_null($this->_params['charset'])) {
-            $this->_params['charset'] = isset($GLOBALS['_HORDE_STRING_CHARSET']) ? $GLOBALS['_HORDE_STRING_CHARSET'] : 'ISO-8859-1';
-        }
-
         $this->_linkList = array();
-
         return trim($text);
     }
 
index 37fb760..fc4fd29 100644 (file)
@@ -52,7 +52,7 @@ class Horde_Text_Filter_Text2html extends Horde_Text_Filter_Base
      */
     protected $_params = array(
         'callback' => 'Horde::externalUrl',
-        'charset' => null,
+        'charset' => 'ISO-8859-1',
         'class' => 'fixed',
         'nofollow' => false,
         'noprefetch' => false,
@@ -83,12 +83,6 @@ class Horde_Text_Filter_Text2html extends Horde_Text_Filter_Base
      */
     public function preProcess($text)
     {
-        if (is_null($this->_params['charset'])) {
-            $this->_params['charset'] = isset($GLOBALS['_HORDE_STRING_CHARSET'])
-                ? $GLOBALS['_HORDE_STRING_CHARSET']
-                : 'ISO-8859-1';
-        }
-
         /* Abort out on simple cases. */
         if ($this->_params['parselevel'] == self::PASSTHRU) {
             return $text;