This commit is contained in:
parent
4aab1572e7
commit
164138af6c
9
vendor/Text/Wiki/Parse.php
vendored
9
vendor/Text/Wiki/Parse.php
vendored
@ -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;
|
||||
|
||||
}
|
||||
|
2
vendor/Text/Wiki/Parse/Default/Code.php
vendored
2
vendor/Text/Wiki/Parse/Default/Code.php
vendored
@ -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'] = '';
|
||||
|
10
vendor/Text/Wiki/Render/Xhtml/Code.php
vendored
10
vendor/Text/Wiki/Render/Xhtml/Code.php
vendored
@ -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,
|
||||
|
6
vendor/simpletest/errors.php
vendored
6
vendor/simpletest/errors.php
vendored
@ -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];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user