Commit 164138af authored by zYne's avatar zYne

--no commit message

--no commit message
parent 4aab1572
......@@ -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;
}
......
......@@ -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) != '<?php') {
// PHP code example:
// add the PHP tags
......@@ -120,6 +120,14 @@ class Text_Wiki_Render_Xhtml_Code extends Text_Wiki_Render {
$text = $this->textEncode($text);
$text = "<pre$css><code$css_html>$text</code></pre>";
} elseif ($type == 'sql') {
// HTML code example:
// add <html> opening and closing tags,
// convert tabs to four spaces,
// convert entities.
$text = str_replace("\t", " ", $text);
$text = $this->textEncode($text);
$text = "<div class='sql'>$text</div>";
} else {
// generic code example:
// convert tabs to four spaces,
......
......@@ -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];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment