diff -r 250aeb408ed7 -r 4c5c2b66a34d includes/render.php --- a/includes/render.php Sat Oct 06 20:47:09 2007 -0400 +++ b/includes/render.php Sun Oct 07 08:39:40 2007 -0400 @@ -270,7 +270,8 @@ } } - $template_regex = "/\{\{([^\]]+?)((\n([ ]*?)[A-z0-9]+([ ]*?)=([ ]*?)(.+?))*)\}\}/is"; + //$template_regex = "/\{\{([^\]]+?)((\n([ ]*?)[A-z0-9]+([ ]*?)=([ ]*?)(.+?))*)\}\}/is"; + $template_regex = "/\{\{(.+)((\n|\|[ ]*([A-z0-9]+)[ ]*=[ ]*(.+))*)\}\}/isU"; $i = 0; while ( preg_match($template_regex, $text) ) { @@ -498,46 +499,6 @@ return $text; } - /* * - * Replaces template inclusions with the templates - * @param string $message The text to format - * @return string - * / - - function old_include_templates($message) - { - $random_id = md5( time() . mt_rand() ); - preg_match_all('#\{\{(.+?)\}\}#s', $message, $matchlist); - foreach($matchlist[1] as $m) - { - $mn = $m; - // Strip out wikilinks and re-add them after the explosion (because of the "|") - preg_match_all('#\[\[(.+?)\]\]#i', $m, $linklist); - //echo '
'.print_r($linklist, true).''; - for($i=0;$i
' . print_r($matches, true) . ''); for ( $i = 0; $i < $count; $i++ ) { $matches[1][$i] = sanitize_page_id($matches[1][$i]); @@ -620,10 +594,9 @@ if ( !empty($parmsection) ) { $parms = RenderMan::parse_template_vars($parmsection); - foreach ( $parms as $j => $parm ) - { - $parms[$j] = $parm; - } + if ( !is_array($parms) ) + // Syntax error + $parms = array(); } else {