From 164138af6c74a6dbb5642c348d4082a819e3fcf0 Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 5 Mar 2007 12:14:42 +0000 Subject: [PATCH] --- vendor/Text/Wiki/Parse.php | 9 +++++++-- vendor/Text/Wiki/Parse/Default/Code.php | 2 +- vendor/Text/Wiki/Render/Xhtml/Code.php | 10 +++++++++- vendor/simpletest/errors.php | 6 +++++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/vendor/Text/Wiki/Parse.php b/vendor/Text/Wiki/Parse.php index 404c6128c..a220d1926 100644 --- a/vendor/Text/Wiki/Parse.php +++ b/vendor/Text/Wiki/Parse.php @@ -233,6 +233,12 @@ class Text_Wiki_Parse { { // find the =" sections; $tmp = explode('="', trim($text)); + $mark = '"'; + + if (count($tmp) == 1) { + $tmp = explode("='", trim($text)); + $mark = "'"; + } // basic setup $k = count($tmp) - 1; @@ -251,12 +257,11 @@ class Text_Wiki_Parse { // find the last double-quote in the value. // the part to the left is the value for the last key, // the part to the right is the next key name - $pos = strrpos($val, '"'); + $pos = strrpos($val, $mark); $attrs[$key] = stripslashes(substr($val, 0, $pos)); $key = trim(substr($val, $pos+1)); } - return $attrs; } diff --git a/vendor/Text/Wiki/Parse/Default/Code.php b/vendor/Text/Wiki/Parse/Default/Code.php index 80bf44973..339fa63b8 100644 --- a/vendor/Text/Wiki/Parse/Default/Code.php +++ b/vendor/Text/Wiki/Parse/Default/Code.php @@ -80,7 +80,7 @@ class Text_Wiki_Parse_Code extends Text_Wiki_Parse { } else { // get the attributes... $attr = $this->getAttrs($args); - + // ... and make sure we have a 'type' if (! isset($attr['type'])) { $attr['type'] = ''; diff --git a/vendor/Text/Wiki/Render/Xhtml/Code.php b/vendor/Text/Wiki/Render/Xhtml/Code.php index 3229d137b..b48b9f396 100644 --- a/vendor/Text/Wiki/Render/Xhtml/Code.php +++ b/vendor/Text/Wiki/Render/Xhtml/Code.php @@ -58,7 +58,7 @@ class Text_Wiki_Render_Xhtml_Code extends Text_Wiki_Render { $css_html = $this->formatConf(' class="%s"', 'css_html'); $css_filename = $this->formatConf(' class="%s"', 'css_filename'); - if ($type == 'php' || true) { + if ($type == 'php') { if (substr($options['text'], 0, 5) != 'textEncode($text); $text = "$text"; + } elseif ($type == 'sql') { + // HTML code example: + // add opening and closing tags, + // convert tabs to four spaces, + // convert entities. + $text = str_replace("\t", " ", $text); + $text = $this->textEncode($text); + $text = "
$text
"; } else { // generic code example: // convert tabs to four spaces, diff --git a/vendor/simpletest/errors.php b/vendor/simpletest/errors.php index f975c4929..711294dd4 100644 --- a/vendor/simpletest/errors.php +++ b/vendor/simpletest/errors.php @@ -109,7 +109,11 @@ E_COMPILE_WARNING => 'E_COMPILE_WARNING', E_USER_ERROR => 'E_USER_ERROR', E_USER_WARNING => 'E_USER_WARNING', - E_USER_NOTICE => 'E_USER_NOTICE'); + E_USER_NOTICE => 'E_USER_NOTICE', + E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR'); + if ( ! isset($map[$severity])) { + return null; + } return $map[$severity]; } }