From 213779b30a0d42cce94c88c5b5e552ea66238f24 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 7 Feb 2006 09:31:44 +0000 Subject: [PATCH] Set the Text_Wiki output format. --- docs/NEWS | 2 ++ .../serendipity_event_textwiki.php | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 1aad063..0e45c49 100644 --- 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 diff --git a/plugins/serendipity_event_textwiki/serendipity_event_textwiki.php b/plugins/serendipity_event_textwiki/serendipity_event_textwiki.php index 742b4a4..699f5e7 100644 --- a/plugins/serendipity_event_textwiki/serendipity_event_textwiki.php +++ b/plugins/serendipity_event_textwiki/serendipity_event_textwiki.php @@ -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); } } -- 2.39.5