https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106349

Revision: 106349
Author:   preilly
Date:     2011-12-15 18:20:25 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
fix for CR comment c27766 on r106128

Modified Paths:
--------------
    trunk/extensions/MobileFrontend/ApplicationTemplate.php
    trunk/extensions/MobileFrontend/MobileFrontend.php

Modified: trunk/extensions/MobileFrontend/ApplicationTemplate.php
===================================================================
--- trunk/extensions/MobileFrontend/ApplicationTemplate.php     2011-12-15 
18:19:36 UTC (rev 106348)
+++ trunk/extensions/MobileFrontend/ApplicationTemplate.php     2011-12-15 
18:20:25 UTC (rev 106349)
@@ -16,7 +16,7 @@
 
                $betaPrefix = ( $this->data['isBetaGroupMember'] ) ? 'beta_' : 
'';
 
-               $noticeHtml = empty( $this->data['noticeHtml'] ) ? '' : 
$this->data['noticeHtml'];
+               $noticeHtml = ( isset( $this->data['noticeHtml'] ) ) ? '' : 
$this->data['noticeHtml'];
 
                $cssFileName = ( isset( $this->data['device']['css_file_name'] 
) ) ? $this->data['device']['css_file_name'] : 'default';
 

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-12-15 18:19:36 UTC 
(rev 106348)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-12-15 18:20:25 UTC 
(rev 106349)
@@ -837,10 +837,8 @@
                        $leaveFeedbackTemplate->setByArray( $options );
                        $leaveFeedbackHtml = $leaveFeedbackTemplate->getHTML();
                        $contentHtml = $leaveFeedbackHtml;
-                       $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : 
''; // FIXME: $noticeHtml is never already set
                        $applicationTemplate = $this->getApplicationTemplate();
                        $options = array(
-                                                       'noticeHtml' => 
$noticeHtml,
                                                        'htmlTitle' => 
self::$messages['mobile-frontend-leave-feedback'],
                                                        'searchWebkitHtml' => 
$searchWebkitHtml,
                                                        'contentHtml' => 
$contentHtml,
@@ -877,10 +875,8 @@
                        $optInTemplate->setByArray( $options );
                        $optInHtml = $optInTemplate->getHTML();
                        $contentHtml = $optInHtml;
-                       $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : 
''; // FIXME: $noticeHtml is never already set
                        $applicationTemplate = $this->getApplicationTemplate();
                        $options = array(
-                                                       'noticeHtml' => 
$noticeHtml,
                                                        'htmlTitle' => 
self::$messages['mobile-frontend-opt-in-title'],
                                                        'searchWebkitHtml' => 
$searchWebkitHtml,
                                                        'contentHtml' => 
$contentHtml,
@@ -917,10 +913,8 @@
                        $optOutTemplate->setByArray( $options );
                        $optOutHtml = $optOutTemplate->getHTML();
                        $contentHtml = $optOutHtml;
-                       $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : 
''; // FIXME: $noticeHtml is never already set
                        $applicationTemplate = $this->getApplicationTemplate();
                        $options = array(
-                                                       'noticeHtml' => 
$noticeHtml,
                                                        'htmlTitle' => 
self::$messages['mobile-frontend-opt-out-title'],
                                                        'searchWebkitHtml' => 
$searchWebkitHtml,
                                                        'contentHtml' => 
$contentHtml,
@@ -967,10 +961,8 @@
                        $disableHtml = $disableTemplate->getHTML();
 
                        $contentHtml = $disableHtml;
-                       $noticeHtml = ( !empty( $noticeHtml ) ) ? $noticeHtml : 
''; // FIXME: $noticeHtml is never already set
                        $applicationTemplate = $this->getApplicationTemplate();
                        $options = array(
-                                                       'noticeHtml' => 
$noticeHtml,
                                                        'htmlTitle' => 
$htmlTitle,
                                                        'searchWebkitHtml' => 
$searchWebkitHtml,
                                                        'contentHtml' => 
$contentHtml,


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to