Filip has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/329216 )
Change subject: Removed unused SpecialNewsletter:getNewsletterActionButtons() ...................................................................... Removed unused SpecialNewsletter:getNewsletterActionButtons() Bug: T154120 Change-Id: I7b49641eaab564b9ce45f007cc188c18bb1a1742 --- M includes/specials/SpecialNewsletter.php 1 file changed, 0 insertions(+), 66 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/16/329216/1 diff --git a/includes/specials/SpecialNewsletter.php b/includes/specials/SpecialNewsletter.php index 811ddc5..c94d22c 100644 --- a/includes/specials/SpecialNewsletter.php +++ b/includes/specials/SpecialNewsletter.php @@ -91,72 +91,6 @@ } /** - * Get the navigation links shown in the subtitle - * - * @param string|null $current subpage currently being shown, null if default "view" page - */ - protected function getNavigationLinks( $current ) { - $linkRenderer = $this->getLinkRenderer(); - $listLink = $linkRenderer->makeKnownLink( - SpecialPage::getTitleFor( 'Newsletters' ), - $this->msg( 'backlinksubtitle', - $this->msg( 'newsletter-subtitlelinks-list' )->text() - )->text() - ); - if ( $current === null ) { - // We've the fancy buttons on the default "view" page so don't - // add redundant navigation links and fast return here - return $listLink; - } - - // Build the links taking the current user's access levels into account - $user = $this->getUser(); - $actions = array(); - if ( $user->isLoggedIn() ) { - $actions[] = $this->newsletter->isSubscribed( $user ) - ? self::NEWSLETTER_UNSUBSCRIBE - : self::NEWSLETTER_SUBSCRIBE; - } - if ( $this->newsletter->isPublisher( $user ) ) { - $actions[] = self::NEWSLETTER_ANNOUNCE; - } - if ( $this->newsletter->canManage( $user ) ) { - $actions[] = self::NEWSLETTER_MANAGE; - $actions[] = self::NEWSLETTER_SUBSCRIBERS; - } - - $links = array(); - foreach ( $actions as $action ) { - $title = $this->getPageTitle( $this->newsletter->getId() . '/' . $action ); - // Messages used here: 'newsletter-subtitlelinks-announce', - // 'newsletter-subtitlelinks-subscribe', 'newsletter-subtitlelinks-unsubscribe' - // 'newsletter-subtitlelinks-manage' - $msg = $this->msg( 'newsletter-subtitlelinks-' . $action )->text(); - $link = $linkRenderer->makeKnownLink( $title, $msg ); - if ( $action == self::NEWSLETTER_MANAGE ) { - $title = Title::makeTitleSafe( NS_NEWSLETTER, $this->newsletter->getName() ); - $msg = $this->msg( 'newsletter-subtitlelinks-' . $action )->text(); - $link = $linkRenderer->makeKnownLink( $title, $msg, [], ['action'=>'edit'] ); - } - if ( $current === $action ) { - $links[] = Linker::makeSelfLinkObj( $title, $msg ); - } else { - - $links[] = $link; - } - } - - $newsletterLinks = $linkRenderer->makeKnownLink( - Title::makeTitleSafe( NS_NEWSLETTER, $this->newsletter->getName() ), - $this->getName() - ) . ' ' . $this->msg( 'parentheses' ) - ->rawParams( $this->getLanguage()->pipeList( $links ) ) - ->text(); - - return $this->getLanguage()->pipeList( array( $listLink, $newsletterLinks ) ); - } - - /** * Create a common HTMLForm which can be used by specific page actions * * @param array $fields array of form fields -- To view, visit https://gerrit.wikimedia.org/r/329216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b49641eaab564b9ce45f007cc188c18bb1a1742 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Filip <r...@protonmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits