r106349 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106348‎ | r106349 | r106350 >
Date:18:20, 15 December 2011
Author:preilly
Status:resolved (Comments)
Tags:
Comment:
fix for CR comment c27766 on r106128
Modified paths:
  • /trunk/extensions/MobileFrontend/ApplicationTemplate.php (modified) (history)
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/ApplicationTemplate.php
@@ -16,7 +16,7 @@
1717
1818 $betaPrefix = ( $this->data['isBetaGroupMember'] ) ? 'beta_' : '';
1919
20 - $noticeHtml = empty( $this->data['noticeHtml'] ) ? '' : $this->data['noticeHtml'];
 20+ $noticeHtml = ( isset( $this->data['noticeHtml'] ) ) ? '' : $this->data['noticeHtml'];
2121
2222 $cssFileName = ( isset( $this->data['device']['css_file_name'] ) ) ? $this->data['device']['css_file_name'] : 'default';
2323
Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -837,10 +837,8 @@
838838 $leaveFeedbackTemplate->setByArray( $options );
839839 $leaveFeedbackHtml = $leaveFeedbackTemplate->getHTML();
840840 $contentHtml = $leaveFeedbackHtml;
841 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
842841 $applicationTemplate = $this->getApplicationTemplate();
843842 $options = array(
844 - 'noticeHtml' => $noticeHtml,
845843 'htmlTitle' => self::$messages['mobile-frontend-leave-feedback'],
846844 'searchWebkitHtml' => $searchWebkitHtml,
847845 'contentHtml' => $contentHtml,
@@ -877,10 +875,8 @@
878876 $optInTemplate->setByArray( $options );
879877 $optInHtml = $optInTemplate->getHTML();
880878 $contentHtml = $optInHtml;
881 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
882879 $applicationTemplate = $this->getApplicationTemplate();
883880 $options = array(
884 - 'noticeHtml' => $noticeHtml,
885881 'htmlTitle' => self::$messages['mobile-frontend-opt-in-title'],
886882 'searchWebkitHtml' => $searchWebkitHtml,
887883 'contentHtml' => $contentHtml,
@@ -917,10 +913,8 @@
918914 $optOutTemplate->setByArray( $options );
919915 $optOutHtml = $optOutTemplate->getHTML();
920916 $contentHtml = $optOutHtml;
921 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
922917 $applicationTemplate = $this->getApplicationTemplate();
923918 $options = array(
924 - 'noticeHtml' => $noticeHtml,
925919 'htmlTitle' => self::$messages['mobile-frontend-opt-out-title'],
926920 'searchWebkitHtml' => $searchWebkitHtml,
927921 'contentHtml' => $contentHtml,
@@ -967,10 +961,8 @@
968962 $disableHtml = $disableTemplate->getHTML();
969963
970964 $contentHtml = $disableHtml;
971 - $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : ''; // FIXME: $noticeHtml is never already set
972965 $applicationTemplate = $this->getApplicationTemplate();
973966 $options = array(
974 - 'noticeHtml' => $noticeHtml,
975967 'htmlTitle' => $htmlTitle,
976968 'searchWebkitHtml' => $searchWebkitHtml,
977969 'contentHtml' => $contentHtml,

Follow-up revisions

RevisionCommit summaryAuthorDate
r106353fix for CR c27769 on r106349preilly18:51, 15 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106128create Mobile Frontend Template class and switch views to inherit from this c...preilly23:25, 13 December 2011

Comments

#Comment by Reedy (talk | contribs)   18:46, 15 December 2011
-		$noticeHtml = empty( $this->data['noticeHtml'] ) ? '' : $this->data['noticeHtml'];
+		$noticeHtml = ( isset( $this->data['noticeHtml'] ) ) ? '' : $this->data['noticeHtml'];

Wrong way round me thinks

Status & tagging log