]> git.mjollnir.org Git - s9y.git/commitdiff
Set the Text_Wiki output format.
authorgarvinhicking <garvinhicking>
Tue, 7 Feb 2006 09:31:44 +0000 (09:31 +0000)
committergarvinhicking <garvinhicking>
Tue, 7 Feb 2006 09:31:44 +0000 (09:31 +0000)
docs/NEWS
plugins/serendipity_event_textwiki/serendipity_event_textwiki.php

index 1aad063dfc254ab9b693d3f86c24621a92c3a018..0e45c49b6a6c3dffcf7992e2c363852f109e32a7 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,8 @@
 Version 1.0-beta2 ()
 ------------------------------------------------------------------------
 
+   * Fix Text_Wiki problems with UTF-8 charsets (garvinhicking)
+
    * Added PHP 5.1.3 filter awareness (Tobias Schlitt)
 
    * Properly sort template listings alphabetically, if using themes
index 742b4a47ad198cb0a2e580dd88d7442225cb8355..699f5e7b3789f563ad28c224c2814a23e782ee7a 100644 (file)
@@ -461,7 +461,7 @@ class serendipity_event_textwiki extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_TEXTWIKI_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Tobias Schlitt');
-        $propbag->add('version',       '1.1');
+        $propbag->add('version',       '1.2');
         $propbag->add('requirements',  array(
             'serendipity' => '0.8',
             'smarty'      => '2.6.7',
@@ -543,6 +543,7 @@ class serendipity_event_textwiki extends serendipity_event
             $propbag->add('type',        'boolean');
             $propbag->add('name',        defined($name) ? constant($name) : $name);
             $propbag->add('description', sprintf(APPLY_MARKUP_TO, defined($name) ? constant($name) : $name));
+            $propbag->add('default', true);
         } else if ($name == 'internal_seperator') {
             $propbag->add('type',        'seperator');
             $propbag->add('name',        'Seperator');
@@ -558,6 +559,7 @@ class serendipity_event_textwiki extends serendipity_event
             $propbag->add('type',        'boolean');
             $propbag->add('name',        ucfirst($name));
             $propbag->add('description', $this->wikiRules[$name]['desc']);
+            $propbag->add('default', $this->wikiRules[$name]['flag']);
             return true;
         } else {
             $parts = explode('_', $name, 2);
@@ -565,6 +567,7 @@ class serendipity_event_textwiki extends serendipity_event
             $propbag->add('type',        $conf['type']);
             $propbag->add('name',        ucfirst($parts[0]).' '.ucwords((str_replace('_', ' ',$parts[1]))));
             $propbag->add('description', $conf['desc']);
+            $propbag->add('default', '');
             return true;
         }
     }
@@ -606,15 +609,17 @@ class serendipity_event_textwiki extends serendipity_event
     }
 
     function _init_wiki(&$bag) {
-        include_once 'Text/Wiki.php';
+        include_once S9Y_PEAR_PATH . 'Text/Wiki.php';
 
         if (class_exists('Text_Wiki')) {
             $this->wiki =& new Text_Wiki;
+            $this->wiki->setFormatConf('Xhtml', 'translate', HTML_SPECIALCHARS);
+            $this->wiki->setFormatConf('Xhtml', 'charset', LANG_CHARSET);
         } else {
             return false;
         }
         foreach ($this->wikiRules as $name => $rule) {
-            if ($this->get_config($name, $rule['flag'])) {
+            if (serendipity_db_bool($this->get_config($name, $rule['flag']))) {
                 $this->_add_wiki_rule($bag, $name, $rule);
             }
         }