r103511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103510‎ | r103511 | r103512 >
Date:21:06, 17 November 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfixes (Undefined variable: userCanEditPage; Only variables should be passed by reference)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_RunQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
@@ -154,8 +154,9 @@
155155 $wgParser->getOutput()->addHeadItem( $script );
156156 } else {
157157 $wgOut->addScript( $script );
158 - if ($wgParser->getOutput()) {
159 - $wgOut->addParserOutputNoText( $wgParser->getOutput() );
 158+ $po = $wgParser->getOutput();
 159+ if ( $po ) {
 160+ $wgOut->addParserOutputNoText( $po );
160161 }
161162 }
162163
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -392,7 +392,7 @@
393393 wfRunHooks( 'sfUserCanEditPage', array( $this->mPageTitle, &$userCanEditPage ) );
394394 }
395395 $form_text = "";
396 - if ( $userCanEditPage || $is_query ) {
 396+ if ( $is_query || $userCanEditPage ) {
397397 $form_is_disabled = false;
398398 // Show "Your IP address will be recorded" warning if
399399 // user is anonymous, and it's not a query -