Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed some problems affecting wiki ** and ## formatting tags.

  • Loading branch information...
commit 92b57640a456e1b066edd3c1a8b579388cdc2466 1 parent aa3d922
mchurch authored
Showing with 12 additions and 12 deletions.
  1. +11 −11 mod/wiki/ewiki/ewiki.php
  2. +1 −1  mod/wiki/view.php
View
22 mod/wiki/ewiki/ewiki.php
@@ -1913,6 +1913,17 @@ function ewiki_format (
}
+ #-- text style triggers
+ foreach ($wm_style as $find=>$replace) {
+ $find_len = strlen($find);
+ $loop = 20;
+ while(($loop--) && (($l = strpos($line, $find)) !== false) && ($r = strpos($line, $find, $l + $find_len))) {
+ $line = substr($line, 0, $l) . $replace[0] .
+ substr($line, $l + strlen($find), $r - $l - $find_len) .
+ $replace[1] . substr($line, $r + $find_len);
+ }
+ }
+
#-- list markup
if (isset($wm_list[$c0])) {
@@ -1981,17 +1992,6 @@ function ewiki_format (
}
- #-- text style triggers
- foreach ($wm_style as $find=>$replace) {
- $find_len = strlen($find);
- $loop = 20;
- while(($loop--) && (($l = strpos($line, $find)) !== false) && ($r = strpos($line, $find, $l + $find_len))) {
- $line = substr($line, 0, $l) . $replace[0] .
- substr($line, $l + strlen($find), $r - $l - $find_len) .
- $replace[1] . substr($line, $r + $find_len);
- }
- }
-
#-- start-end markup
foreach ($wm_start_end as $d) {
$len0 = strlen($d[0]);
View
2  mod/wiki/view.php
@@ -17,7 +17,7 @@
optional_variable($groupid); // Group wiki.
optional_variable($canceledit,""); // Editing has been cancelled
if($canceledit) {
- $wikipage=$ewiki_id;
+ @$wikipage=$ewiki_id;
}
if ($id) {
Please sign in to comment.
Something went wrong with that request. Please try again.