http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65396
Revision: 65396
Author: yaron
Date: 2010-04-21 15:20:22 +0000 (Wed, 21 Apr 2010)
Log Message:
-----------
Slight improvements to PHP and formatting
Modified Paths:
--------------
trunk/extensions/SemanticForms/includes/SF_Utils.inc
Modified: trunk/extensions/SemanticForms/includes/SF_Utils.inc
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_Utils.inc 2010-04-21
15:11:21 UTC (rev 65395)
+++ trunk/extensions/SemanticForms/includes/SF_Utils.inc 2010-04-21
15:20:22 UTC (rev 65396)
@@ -395,15 +395,16 @@
$title = $parser->getTitle();
if (empty($title)) return true;
- if ($parser->getTitle()->getNamespace() != SF_NS_FORM) return
true;
+ if ($title->getNamespace() != SF_NS_FORM) return true;
// Remove <noinclude> sections and <includeonly> tags from form
definition
$form_def = StringUtils::delimiterReplace('<noinclude>',
'</noinclude>', '', $text);
$form_def = strtr($form_def, array('<includeonly>' => '',
'</includeonly>' => ''));
// parse wiki-text
- // add '<nowiki>' tags around every triple-bracketed form
definition
- // element, so that the wiki parser won't touch it - the parser
will
- // remove the '<nowiki>' tags, leaving us with what we need
+ // add '<nowiki>' tags around every triple-bracketed form
+ // definition element, so that the wiki parser won't touch
+ // it - the parser will remove the '<nowiki>' tags, leaving
+ // us with what we need
$form_def = "__NOEDITSECTION__" . strtr($form_def, array('{{{'
=> '<nowiki>{{{', '}}}' => '}}}</nowiki>'));
$dummy_title = Title::newFromText('Form definition title for
caching purposes');
$form_def = $parser->parse($form_def, $dummy_title,
$parser->mOptions)->getText();
@@ -411,5 +412,4 @@
$parser->mOutput->setProperty( 'formdefinition', $form_def );
return true;
}
-
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs