Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | * unfortunately, str_replace() doesn't allow for that. |
132 | 132 | * This code is basically copied directly from |
133 | 133 | * http://www.php.net/manual/en/function.str-replace.php#86177 |
134 | | - * - this might make sense in some SF utils class, if it's useful in |
| 134 | + * - this might make sense in the SFUtils class, if it's useful in |
135 | 135 | * other places. |
136 | 136 | */ |
137 | 137 | function strReplaceFirst( $search, $replace, $subject) { |
— | — | @@ -255,8 +255,8 @@ |
256 | 256 | $wgParser->mOptions = new ParserOptions(); |
257 | 257 | $wgParser->mOptions->initialiseFromUser( $wgUser ); |
258 | 258 | |
259 | | - // get the form definition from the cache, if we're using caching and it's |
260 | | - // there |
| 259 | + // Get the form definition from the cache, if we're using caching and it's |
| 260 | + // there. |
261 | 261 | $got_form_def_from_cache = false; |
262 | 262 | global $sfgCacheFormDefinitions; |
263 | 263 | if ( $sfgCacheFormDefinitions && ! is_null( $form_id ) ) { |
— | — | @@ -267,7 +267,7 @@ |
268 | 268 | $got_form_def_from_cache = true; |
269 | 269 | } |
270 | 270 | } |
271 | | - // otherwise, parse it |
| 271 | + // Otherwise, parse it. |
272 | 272 | if ( ! $got_form_def_from_cache ) { |
273 | 273 | $form_def = $wgParser->parse( $form_def, $this->mPageTitle, $wgParser->mOptions )->getText(); |
274 | 274 | } |
— | — | @@ -293,7 +293,7 @@ |
294 | 294 | while ( $brackets_loc = strpos( $form_def, "{{{", $start_position ) ) { |
295 | 295 | $brackets_end_loc = strpos( $form_def, "}}}", $brackets_loc ); |
296 | 296 | $bracketed_string = substr( $form_def, $brackets_loc + 3, $brackets_end_loc - ( $brackets_loc + 3 ) ); |
297 | | - $tag_components = explode( '|', $bracketed_string ); |
| 297 | + $tag_components = SFUtils::getFormTagComponents( $bracketed_string ); |
298 | 298 | $tag_title = trim( $tag_components[0] ); |
299 | 299 | if ( $tag_title == 'for template' || $tag_title == 'end template' ) { |
300 | 300 | // create a section for everything up to here |
— | — | @@ -326,7 +326,7 @@ |
327 | 327 | while ( $brackets_loc = strpos( $section, '{{{', $start_position ) ) { |
328 | 328 | $brackets_end_loc = strpos( $section, "}}}", $brackets_loc ); |
329 | 329 | $bracketed_string = substr( $section, $brackets_loc + 3, $brackets_end_loc - ( $brackets_loc + 3 ) ); |
330 | | - $tag_components = explode( '|', $bracketed_string ); |
| 330 | + $tag_components = SFUtils::getFormTagComponents( $bracketed_string ); |
331 | 331 | $tag_title = trim( $tag_components[0] ); |
332 | 332 | // ===================================================== |
333 | 333 | // for template processing |