r106342 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106341‎ | r106342 | r106343 >
Date:17:29, 15 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Leave some FIXME comments, $noticeHtml is never defined on those paths
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -837,7 +837,7 @@
838838 $leaveFeedbackTemplate->setByArray( $options );
839839 $leaveFeedbackHtml = $leaveFeedbackTemplate->getHTML();
840840 $contentHtml = $leaveFeedbackHtml;
841 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : '';
 841+ $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
842842 $applicationTemplate = $this->getApplicationTemplate();
843843 $options = array(
844844 'noticeHtml' => $noticeHtml,
@@ -877,7 +877,7 @@
878878 $optInTemplate->setByArray( $options );
879879 $optInHtml = $optInTemplate->getHTML();
880880 $contentHtml = $optInHtml;
881 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : '';
 881+ $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
882882 $applicationTemplate = $this->getApplicationTemplate();
883883 $options = array(
884884 'noticeHtml' => $noticeHtml,
@@ -906,18 +906,18 @@
907907 $searchWebkitHtml = $searchTemplate->getHTML();
908908 $footerTemplate = $this->getFooterTemplate();
909909 $footerHtml = $footerTemplate->getHTML();
910 - $optOutTemplate = new OptOutTemplate();
911 - $options = array(
912 - 'explainOptOut' => self::$messages['mobile-frontend-opt-out-explain'],
913 - 'optOutMessage' => self::$messages['mobile-frontend-opt-out-message'],
914 - 'yesButton' => self::$messages['mobile-frontend-opt-out-yes-button'],
915 - 'noButton' => self::$messages['mobile-frontend-opt-out-no-button'],
916 - 'formAction' => wfExpandUrl( Title::newMainPage()->getFullURL(), PROTO_CURRENT ),
917 - );
918 - $optOutTemplate->setByArray( $options );
919 - $optOutHtml = $optOutTemplate->getHTML();
 910+ $optOutTemplate = new OptOutTemplate();
 911+ $options = array(
 912+ 'explainOptOut' => self::$messages['mobile-frontend-opt-out-explain'],
 913+ 'optOutMessage' => self::$messages['mobile-frontend-opt-out-message'],
 914+ 'yesButton' => self::$messages['mobile-frontend-opt-out-yes-button'],
 915+ 'noButton' => self::$messages['mobile-frontend-opt-out-no-button'],
 916+ 'formAction' => wfExpandUrl( Title::newMainPage()->getFullURL(), PROTO_CURRENT ),
 917+ );
 918+ $optOutTemplate->setByArray( $options );
 919+ $optOutHtml = $optOutTemplate->getHTML();
920920 $contentHtml = $optOutHtml;
921 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : '';
 921+ $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
922922 $applicationTemplate = $this->getApplicationTemplate();
923923 $options = array(
924924 'noticeHtml' => $noticeHtml,
@@ -967,7 +967,7 @@
968968 $disableHtml = $disableTemplate->getHTML();
969969
970970 $contentHtml = $disableHtml;
971 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : '';
 971+ $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
972972 $applicationTemplate = $this->getApplicationTemplate();
973973 $options = array(
974974 'noticeHtml' => $noticeHtml,

Status & tagging log