Adamw has uploaded a new change for review.

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


Change subject: Fix broken links to banner
......................................................................

Fix broken links to banner

Change-Id: I663d3c794690c90d81bb39b42d1c88c953fbde0b
---
M includes/Campaign.php
M special/SpecialGlobalAllocation.php
2 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/22/62822/1

diff --git a/includes/Campaign.php b/includes/Campaign.php
index fae7805..10fc2fe 100644
--- a/includes/Campaign.php
+++ b/includes/Campaign.php
@@ -263,12 +263,13 @@
                                if ( $historical_banner === null ) {
                                        //FIXME: crazy hacks
                                        $historical_banner = 
Banner::getBannerSettings( $name );
-                                       $historical_banner['name'] = wfMessage( 
'centralnotice-damaged-log', $name );
+                                       $historical_banner['label'] = 
wfMessage( 'centralnotice-damaged-log', $name );
                                        $historical_banner['display_anon'] = 
$historical_banner['anon'];
                                        $historical_banner['display_account'] = 
$historical_banner['account'];
                                        $historical_banner['device'] = 
'desktop';
                                }
                                $banner['name'] = $name;
+                               $banner['label'] = $name;
 
                                $campaign_info = array(
                                        'campaign' => $campaign['name'],
diff --git a/special/SpecialGlobalAllocation.php 
b/special/SpecialGlobalAllocation.php
index 8c57461..f8be9d2 100644
--- a/special/SpecialGlobalAllocation.php
+++ b/special/SpecialGlobalAllocation.php
@@ -539,7 +539,7 @@
        function getBannerAllocationsVariantRow( $banner, $variesAnon, 
$variesBucket, $isAnon, $bucket ) {
                $htmlOut = '';
 
-               $viewBanner = $this->getTitleFor( 'CentralNoticeBanners', 
"edit/$banner" );
+               $viewBanner = $this->getTitleFor( 'CentralNoticeBanners', 
"edit/{$banner['name']}" );
                $viewCampaign = $this->getTitleFor( 'CentralNotice' );
 
                // Row begin
@@ -580,9 +580,7 @@
                                array( 'class' => 
'cn-'.$banner['campaign'].'-'.$banner['name'] ) );
                        $htmlOut .= Linker::link(
                                $viewBanner,
-                               htmlspecialchars( $banner['name'] ),
-                               array(),
-                               array( 'template' => $banner['name'] )
+                               htmlspecialchars( $banner['label'] )
                        );
                        $htmlOut .= Html::closeElement( 'span' );
                        $htmlOut .= Html::closeElement( 'td' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I663d3c794690c90d81bb39b42d1c88c953fbde0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>

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

Reply via email to