Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/173213

Change subject: Remove code powering talk count
......................................................................

Remove code powering talk count

As much as I love this, it's not getting any love any time soon
and is just being a pest in our codebase so let's kill it.

Change-Id: Ifef3dc73f73178ed99fe7ca3f02dbfe56cb2382b
---
M includes/skins/SkinMinervaAlpha.php
M less/modules/talk.less
2 files changed, 0 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/13/173213/1

diff --git a/includes/skins/SkinMinervaAlpha.php 
b/includes/skins/SkinMinervaAlpha.php
index 0e28405..db3d1d2 100644
--- a/includes/skins/SkinMinervaAlpha.php
+++ b/includes/skins/SkinMinervaAlpha.php
@@ -57,16 +57,6 @@
        }
 
        /**
-        * initialize various variables and generate the template
-        * @return QuickTemplate
-        */
-       protected function prepareQuickTemplate() {
-               $tpl = parent::prepareQuickTemplate();
-               $this->prepareTalkLabel( $tpl );
-               return $tpl;
-       }
-
-       /**
         * Get various skin specific configuration.
         * @return array
         */
@@ -74,46 +64,5 @@
                $vars = parent::getSkinConfigVariables();
                $vars['wgMFAnonymousEditing'] = true;
                return $vars;
-       }
-
-       /**
-        * Add the talk page link for logged in alpha users to template
-        * @param BaseTemplate $tpl an instance of BaseTemplate
-        * @return QuickTemplate
-        */
-       protected function prepareTalkLabel( BaseTemplate $tpl ) {
-               $title = $this->getTitle();
-               $isSpecialPage = $title->isSpecialPage();
-
-               // talk page link for logged in alpha users
-               if ( !$isSpecialPage && !$title->isTalkPage() ) {
-                       $talkTitle = $title->getTalkPage();
-                       if ( $talkTitle->getArticleID() ) {
-                               $dbr = wfGetDB( DB_SLAVE );
-                               $numTopics = (int)$dbr->selectField( 
'page_props', 'pp_value',
-                                       array(
-                                               'pp_page' => 
$talkTitle->getArticleID(),
-                                               'pp_propname' => 
'page_top_level_section_count'
-                                       ),
-                                       __METHOD__
-                               );
-                       } else {
-                               $numTopics = 0;
-                       }
-                       if ( $numTopics ) {
-                               $talkLabel = $this->getLanguage()->formatNum( 
$numTopics );
-
-                               $class = MobileUI::iconClass( 'talk', 
'element', 'count' );
-                       } else {
-                               $talkLabel = wfMessage( 
'mobile-frontend-talk-overlay-header' );
-                               $class = MobileUI::iconClass( 'talk', 'element' 
);
-                       }
-                       $menu = $tpl->data['page_actions'];
-                       if ( isset( $menu['talk'] ) ) {
-                               $menu['talk']['text'] = $talkLabel;
-                               $menu['talk']['class'] = $class;
-                       }
-                       $tpl->set( 'page_actions', $menu );
-               }
        }
 }
diff --git a/less/modules/talk.less b/less/modules/talk.less
index f86f70c..a6d1a2e 100644
--- a/less/modules/talk.less
+++ b/less/modules/talk.less
@@ -1,24 +1,6 @@
 @import "minerva.variables";
 @import "minerva.mixins";
 
-
-.alpha #page-actions #ca-talk.count {
-       a {
-               text-indent: 0;
-               text-align: center;
-               line-height: 38px;
-               font-weight: bold;
-               color: #FFF;
-               margin-left: 4px;
-               font-size: 9px; // FIXME: use pixels for time being as the icon 
in pixels.
-       }
-}
-body.rtl #page-actions #ca-talk.count {
-        a {
-                padding-right: 15px;
-        }
-}
-
 .overlay {
        .error {
                border: solid 1px @redBase;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef3dc73f73178ed99fe7ca3f02dbfe56cb2382b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to