jenkins-bot has submitted this change and it was merged.

Change subject: Spacing tweaks; renamed echoInstalled() to isEchoInstalled()
......................................................................


Spacing tweaks; renamed echoInstalled() to isEchoInstalled()

Change-Id: I2545a3fa6a45b41d09cf97285af9f2bdbf28fcac
---
M templates/NotificationsMenu.tmpl.php
1 file changed, 17 insertions(+), 25 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/NotificationsMenu.tmpl.php 
b/templates/NotificationsMenu.tmpl.php
index 997dea1..81c08aa 100644
--- a/templates/NotificationsMenu.tmpl.php
+++ b/templates/NotificationsMenu.tmpl.php
@@ -9,26 +9,25 @@
        private $output;
        const MAX_NOTES = 5;
 
-       private function echoInstalled() {
-                       return class_exists( 'ApiEchoNotifications' ) && 
class_exists( 'MWEchoNotifUser' );
+       private function isEchoInstalled() {
+               return class_exists( 'ApiEchoNotifications' ) && class_exists( 
'MWEchoNotifUser' );
        }
 
        private function addEchoNotifications() {
-                       $notifications = 
ApiEchoNotifications::getNotifications( $this->data['user'], 'html', 
self::MAX_NOTES );
-                       $output = '';
+               $notifications = ApiEchoNotifications::getNotifications( 
$this->data['user'], 'html', self::MAX_NOTES );
+               $output = '';
 
-                       if ( $notifications ) {
-                               foreach ( $notifications as $note ) {
-                                       $output .= $note['*'];
-                               }
+               if ( $notifications ) {
+                       foreach ( $notifications as $note ) {
+                               $output .= $note['*'];
                        }
+               }
 
-                       $this->output .= $output;
+               $this->output .= $output;
        }
 
        public function hasNotifications() {
-
-               if ( $this->echoInstalled() ) {
+               if ( $this->isEchoInstalled() ) {
                        $notifUser = MWEchoNotifUser::newFromUser( 
$this->data['user'] );
                        return $notifUser->getNotificationCount( false ) >= 1;
                }
@@ -37,27 +36,23 @@
        }
 
        public function addRibbon() {
-
                $ribbonClass = 'ribbon';
 
                if ( $this->data['newtalk'] ) {
                        $ribbonMessage = wfMessage( 'tempo-ribbon-newmessages' 
);
                        $ribbonClass .= ' unread';
-
                } else {
                        $ribbonMessage = wfMessage( 
'tempo-ribbon-nonewmessages' );
                        $ribbonClass .= ' read';
                }
 
-               $this->output .= Html::openElement( 'li' ) . 
-                                               Linker::link( 
$this->data['user']->getTalkPage(), $ribbonMessage, array( 'class' => 
$ribbonClass ) ); 
-                                        Html::closeElement( 'li' );
-
+               $this->output .= Html::openElement( 'li' ) .
+                                               Linker::link( 
$this->data['user']->getTalkPage(), $ribbonMessage, array( 'class' => 
$ribbonClass ) );
+                                       Html::closeElement( 'li' );
        }
 
        public function execute() {
-
-               if ( $this->echoInstalled() ) {
+               if ( $this->isEchoInstalled() ) {
                        $this->addEchoNotifications();
                } else {
                        $this->addRibbon();
@@ -72,8 +67,8 @@
                $linkClass = '';
        }
 
-       if ( $this->echoInstalled() ) {
-               echo Linker::link( SpecialPage::getTitleFor( 'Notifications' ), 
wfMessage('tempo-notifications' )->plain(), array( 'class' => $linkClass ) );
+       if ( $this->isEchoInstalled() ) {
+               echo Linker::link( SpecialPage::getTitleFor( 'Notifications' ), 
wfMessage( 'tempo-notifications' )->plain(), array( 'class' => $linkClass ) );
        } else {
                echo Html::rawElement( 'a', array( 'href' => '#', 'class' => 
$linkClass ), wfMessage( 'tempo-notifications' )->plain() );
        }
@@ -85,9 +80,6 @@
        ?>
 </ul>
 <?php
+       }
 
 }
-
-}
-
-

-- 
To view, visit https://gerrit.wikimedia.org/r/227672
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2545a3fa6a45b41d09cf97285af9f2bdbf28fcac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Tempo
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to