[MediaWiki-commits] [Gerrit] Set the correct special page headers so that What links her... - change (mediawiki...SocialProfile)

2014-01-11 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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


Change subject: Set the correct special page headers so that What links here 
and Page info won't show up on the toolbox when you're viewing these special 
pages.
..

Set the correct special page headers so that What links here and Page
info won't show up on the toolbox when you're viewing these special
pages.

Also fixed a bug with the Use social userpage/Use wiki userpage button
label message in UserProfile/UserProfilePage.php. Previously it would
display (at least initially) Use social userpage even when you were
already using it (in which case the label should've prompted you to Use
wiki userpage instead).

Change-Id: I0269d5ed560f233bd0736ac710d00b5c71f2
---
M SystemGifts/SpecialPopulateAwards.php
M SystemGifts/SpecialRemoveMasterSystemGift.php
M SystemGifts/SpecialSystemGiftManager.php
M SystemGifts/SpecialSystemGiftManagerLogo.php
M SystemGifts/SpecialViewSystemGift.php
M SystemGifts/SpecialViewSystemGifts.php
M SystemGifts/TopAwards.php
M UserActivity/UserActivity.body.php
M UserBoard/SpecialSendBoardBlast.php
M UserBoard/SpecialUserBoard.php
M UserGifts/SpecialGiftManager.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/SpecialGiveGift.php
M UserGifts/SpecialRemoveGift.php
M UserGifts/SpecialRemoveMasterGift.php
M UserGifts/SpecialViewGift.php
M UserGifts/SpecialViewGifts.php
M UserProfile/SpecialEditProfile.php
M UserProfile/SpecialRemoveAvatar.php
M UserProfile/SpecialUpdateProfile.php
M UserProfile/UserProfilePage.php
M UserRelationship/SpecialViewRelationshipRequests.php
M UserRelationship/SpecialViewRelationships.php
M UserStats/TopFansByStat.php
M UserStats/TopFansRecent.php
M UserStats/TopUsers.php
26 files changed, 78 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/11/107011/1

diff --git a/SystemGifts/SpecialPopulateAwards.php 
b/SystemGifts/SpecialPopulateAwards.php
index a49e19f..0b2ebbb 100644
--- a/SystemGifts/SpecialPopulateAwards.php
+++ b/SystemGifts/SpecialPopulateAwards.php
@@ -45,6 +45,10 @@
return;
}
 
+   // Set the robot policies, etc.
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( 'noindex,nofollow' );
+
$wgUserLevels = '';
 
$g = new SystemGifts();
diff --git a/SystemGifts/SpecialRemoveMasterSystemGift.php 
b/SystemGifts/SpecialRemoveMasterSystemGift.php
index 72896e5..54d9a06 100644
--- a/SystemGifts/SpecialRemoveMasterSystemGift.php
+++ b/SystemGifts/SpecialRemoveMasterSystemGift.php
@@ -59,6 +59,10 @@
return;
}
 
+   // Set the robot policies, etc.
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( 'noindex,nofollow' );
+
// Add CSS
$out-addModules( 'ext.socialprofile.systemgifts.css' );
 
diff --git a/SystemGifts/SpecialSystemGiftManager.php 
b/SystemGifts/SpecialSystemGiftManager.php
index f3b26a6..b510ed9 100644
--- a/SystemGifts/SpecialSystemGiftManager.php
+++ b/SystemGifts/SpecialSystemGiftManager.php
@@ -26,7 +26,8 @@
$request = $this-getRequest();
$user = $this-getUser();
 
-   $out-setPageTitle( $this-msg( 'systemgiftmanager' )-plain() 
);
+   // Set the page title, robot policies, etc.
+   $this-setHeaders();
 
// If the user doesn't have the required 'awardsmanage' 
permission, display an error
if ( !$user-isAllowed( 'awardsmanage' ) ) {
diff --git a/SystemGifts/SpecialSystemGiftManagerLogo.php 
b/SystemGifts/SpecialSystemGiftManagerLogo.php
index 7d983de..85cd4c0 100644
--- a/SystemGifts/SpecialSystemGiftManagerLogo.php
+++ b/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -35,6 +35,10 @@
$request = $this-getRequest();
$user = $this-getUser();
 
+   // Set the robot policies, etc.
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( 'noindex,nofollow' );
+
// If the user doesn't have the required 'awardsmanage' 
permission, display an error
if ( !$user-isAllowed( 'awardsmanage' ) ) {
$out-permissionRequired( 'awardsmanage' );
diff --git a/SystemGifts/SpecialViewSystemGift.php 
b/SystemGifts/SpecialViewSystemGift.php
index 82f4d41..57bce35 100644
--- a/SystemGifts/SpecialViewSystemGift.php
+++ b/SystemGifts/SpecialViewSystemGift.php
@@ -26,6 +26,9 @@
$out = $this-getOutput();
$user = $this-getUser();
 
+   // Set the page title, robot policies, etc.
+   $this-setHeaders();
+
// Add CSS
$out-addModules( 'ext.socialprofile.systemgifts.css' );
 
diff --git 

[MediaWiki-commits] [Gerrit] Set the correct special page headers so that What links her... - change (mediawiki...SocialProfile)

2014-01-11 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Set the correct special page headers so that What links here 
and Page info won't show up on the toolbox when you're viewing these special 
pages.
..


Set the correct special page headers so that What links here and Page
info won't show up on the toolbox when you're viewing these special
pages.

Also fixed a bug with the Use social userpage/Use wiki userpage button
label message in UserProfile/UserProfilePage.php. Previously it would
display (at least initially) Use social userpage even when you were
already using it (in which case the label should've prompted you to Use
wiki userpage instead).

Change-Id: I0269d5ed560f233bd0736ac710d00b5c71f2
---
M SystemGifts/SpecialPopulateAwards.php
M SystemGifts/SpecialRemoveMasterSystemGift.php
M SystemGifts/SpecialSystemGiftManager.php
M SystemGifts/SpecialSystemGiftManagerLogo.php
M SystemGifts/SpecialViewSystemGift.php
M SystemGifts/SpecialViewSystemGifts.php
M SystemGifts/TopAwards.php
M UserActivity/UserActivity.body.php
M UserBoard/SpecialSendBoardBlast.php
M UserBoard/SpecialUserBoard.php
M UserGifts/SpecialGiftManager.php
M UserGifts/SpecialGiftManagerLogo.php
M UserGifts/SpecialGiveGift.php
M UserGifts/SpecialRemoveGift.php
M UserGifts/SpecialRemoveMasterGift.php
M UserGifts/SpecialViewGift.php
M UserGifts/SpecialViewGifts.php
M UserProfile/SpecialEditProfile.php
M UserProfile/SpecialRemoveAvatar.php
M UserProfile/SpecialUpdateProfile.php
M UserProfile/UserProfilePage.php
M UserRelationship/SpecialViewRelationshipRequests.php
M UserRelationship/SpecialViewRelationships.php
M UserStats/TopFansByStat.php
M UserStats/TopFansRecent.php
M UserStats/TopUsers.php
26 files changed, 78 insertions(+), 3 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/SystemGifts/SpecialPopulateAwards.php 
b/SystemGifts/SpecialPopulateAwards.php
index a49e19f..0b2ebbb 100644
--- a/SystemGifts/SpecialPopulateAwards.php
+++ b/SystemGifts/SpecialPopulateAwards.php
@@ -45,6 +45,10 @@
return;
}
 
+   // Set the robot policies, etc.
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( 'noindex,nofollow' );
+
$wgUserLevels = '';
 
$g = new SystemGifts();
diff --git a/SystemGifts/SpecialRemoveMasterSystemGift.php 
b/SystemGifts/SpecialRemoveMasterSystemGift.php
index 72896e5..54d9a06 100644
--- a/SystemGifts/SpecialRemoveMasterSystemGift.php
+++ b/SystemGifts/SpecialRemoveMasterSystemGift.php
@@ -59,6 +59,10 @@
return;
}
 
+   // Set the robot policies, etc.
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( 'noindex,nofollow' );
+
// Add CSS
$out-addModules( 'ext.socialprofile.systemgifts.css' );
 
diff --git a/SystemGifts/SpecialSystemGiftManager.php 
b/SystemGifts/SpecialSystemGiftManager.php
index f3b26a6..b510ed9 100644
--- a/SystemGifts/SpecialSystemGiftManager.php
+++ b/SystemGifts/SpecialSystemGiftManager.php
@@ -26,7 +26,8 @@
$request = $this-getRequest();
$user = $this-getUser();
 
-   $out-setPageTitle( $this-msg( 'systemgiftmanager' )-plain() 
);
+   // Set the page title, robot policies, etc.
+   $this-setHeaders();
 
// If the user doesn't have the required 'awardsmanage' 
permission, display an error
if ( !$user-isAllowed( 'awardsmanage' ) ) {
diff --git a/SystemGifts/SpecialSystemGiftManagerLogo.php 
b/SystemGifts/SpecialSystemGiftManagerLogo.php
index 7d983de..85cd4c0 100644
--- a/SystemGifts/SpecialSystemGiftManagerLogo.php
+++ b/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -35,6 +35,10 @@
$request = $this-getRequest();
$user = $this-getUser();
 
+   // Set the robot policies, etc.
+   $out-setArticleRelated( false );
+   $out-setRobotPolicy( 'noindex,nofollow' );
+
// If the user doesn't have the required 'awardsmanage' 
permission, display an error
if ( !$user-isAllowed( 'awardsmanage' ) ) {
$out-permissionRequired( 'awardsmanage' );
diff --git a/SystemGifts/SpecialViewSystemGift.php 
b/SystemGifts/SpecialViewSystemGift.php
index 82f4d41..57bce35 100644
--- a/SystemGifts/SpecialViewSystemGift.php
+++ b/SystemGifts/SpecialViewSystemGift.php
@@ -26,6 +26,9 @@
$out = $this-getOutput();
$user = $this-getUser();
 
+   // Set the page title, robot policies, etc.
+   $this-setHeaders();
+
// Add CSS
$out-addModules( 'ext.socialprofile.systemgifts.css' );
 
diff --git a/SystemGifts/SpecialViewSystemGifts.php 
b/SystemGifts/SpecialViewSystemGifts.php