r65396 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65395‎ | r65396 | r65397 >
Date:15:20, 21 April 2010
Author:yaron
Status:deferred
Tags:
Comment:
Slight improvements to PHP and formatting
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.inc
@@ -395,15 +395,16 @@
396396
397397 $title = $parser->getTitle();
398398 if (empty($title)) return true;
399 - if ($parser->getTitle()->getNamespace() != SF_NS_FORM) return true;
 399+ if ($title->getNamespace() != SF_NS_FORM) return true;
400400 // Remove <noinclude> sections and <includeonly> tags from form definition
401401 $form_def = StringUtils::delimiterReplace('<noinclude>', '</noinclude>', '', $text);
402402 $form_def = strtr($form_def, array('<includeonly>' => '', '</includeonly>' => ''));
403403
404404 // parse wiki-text
405 - // add '<nowiki>' tags around every triple-bracketed form definition
406 - // element, so that the wiki parser won't touch it - the parser will
407 - // remove the '<nowiki>' tags, leaving us with what we need
 405+ // add '<nowiki>' tags around every triple-bracketed form
 406+ // definition element, so that the wiki parser won't touch
 407+ // it - the parser will remove the '<nowiki>' tags, leaving
 408+ // us with what we need
408409 $form_def = "__NOEDITSECTION__" . strtr($form_def, array('{{{' => '<nowiki>{{{', '}}}' => '}}}</nowiki>'));
409410 $dummy_title = Title::newFromText('Form definition title for caching purposes');
410411 $form_def = $parser->parse($form_def, $dummy_title, $parser->mOptions)->getText();
@@ -411,5 +412,4 @@
412413 $parser->mOutput->setProperty( 'formdefinition', $form_def );
413414 return true;
414415 }
415 -
416416 }

Status & tagging log