[MediaWiki-commits] [Gerrit] mediawiki...GlobalUserPage[master]: Remove SkinTemplateNavigationUniversal hook

2016-09-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove SkinTemplateNavigationUniversal hook
..


Remove SkinTemplateNavigationUniversal hook

As of 67d589450e in MediaWiki core, this is no longer needed.

Change-Id: I8f45ed0b151d3356754c0cd653163cac9907
---
M GlobalUserPage.hooks.php
M extension.json
2 files changed, 1 insertion(+), 28 deletions(-)

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



diff --git a/GlobalUserPage.hooks.php b/GlobalUserPage.hooks.php
index 1054c06..6883808 100644
--- a/GlobalUserPage.hooks.php
+++ b/GlobalUserPage.hooks.php
@@ -42,30 +42,6 @@
}
 
/**
-* Turn red links into blue in the navigation tabs (Monobook's 
p-cactions).
-*
-* @param SkinTemplate $sktemplate
-* @param array $links
-* @return bool
-*/
-   public static function onSkinTemplateNavigationUniversal( &$sktemplate, 
&$links ) {
-   $title = $sktemplate->getTitle()->getSubjectPage(); // We want 
the user page
-
-   if ( !$title->exists() && 
GlobalUserPage::shouldDisplayGlobalPage( $title ) ) {
-   // Removes ?action=edit=1
-   $links['namespaces']['user']['href'] = 
$title->getFullURL();
-   // Remove the "new" class:
-   // "selected new" --> "selected"
-   // "new" --> ""
-   $links['namespaces']['user']['class'] = trim(
-   str_replace( 'new', '', 
$links['namespaces']['user']['class'] )
-   );
-   }
-
-   return true;
-   }
-
-   /**
 * Mark global user pages as known so they appear in blue
 *
 * @param Title $title title to check
diff --git a/extension.json b/extension.json
index 69d4549..1fc2d0a 100644
--- a/extension.json
+++ b/extension.json
@@ -10,7 +10,7 @@
"license-name": "CC0-1.0",
"type": "other",
"requires": {
-   "MediaWiki": ">= 1.27.0"
+   "MediaWiki": ">= 1.28.0"
},
"MessagesDirs": {
"GlobalUserPage": [
@@ -23,9 +23,6 @@
"Hooks": {
"GetPreferences": [
"GlobalUserPageHooks::onGetPreferences"
-   ],
-   "SkinTemplateNavigation::Universal": [
-   "GlobalUserPageHooks::onSkinTemplateNavigationUniversal"
],
"TitleIsAlwaysKnown": [
"GlobalUserPageHooks::onTitleIsAlwaysKnown"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f45ed0b151d3356754c0cd653163cac9907
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...GlobalUserPage[master]: Remove SkinTemplateNavigationUniversal hook

2016-09-13 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Remove SkinTemplateNavigationUniversal hook
..

Remove SkinTemplateNavigationUniversal hook

As of 67d589450e in MediaWiki core, this is no longer needed.

Change-Id: I8f45ed0b151d3356754c0cd653163cac9907
---
M GlobalUserPage.hooks.php
M extension.json
2 files changed, 1 insertion(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage 
refs/changes/52/310452/1

diff --git a/GlobalUserPage.hooks.php b/GlobalUserPage.hooks.php
index 1054c06..6883808 100644
--- a/GlobalUserPage.hooks.php
+++ b/GlobalUserPage.hooks.php
@@ -42,30 +42,6 @@
}
 
/**
-* Turn red links into blue in the navigation tabs (Monobook's 
p-cactions).
-*
-* @param SkinTemplate $sktemplate
-* @param array $links
-* @return bool
-*/
-   public static function onSkinTemplateNavigationUniversal( &$sktemplate, 
&$links ) {
-   $title = $sktemplate->getTitle()->getSubjectPage(); // We want 
the user page
-
-   if ( !$title->exists() && 
GlobalUserPage::shouldDisplayGlobalPage( $title ) ) {
-   // Removes ?action=edit=1
-   $links['namespaces']['user']['href'] = 
$title->getFullURL();
-   // Remove the "new" class:
-   // "selected new" --> "selected"
-   // "new" --> ""
-   $links['namespaces']['user']['class'] = trim(
-   str_replace( 'new', '', 
$links['namespaces']['user']['class'] )
-   );
-   }
-
-   return true;
-   }
-
-   /**
 * Mark global user pages as known so they appear in blue
 *
 * @param Title $title title to check
diff --git a/extension.json b/extension.json
index 69d4549..1fc2d0a 100644
--- a/extension.json
+++ b/extension.json
@@ -10,7 +10,7 @@
"license-name": "CC0-1.0",
"type": "other",
"requires": {
-   "MediaWiki": ">= 1.27.0"
+   "MediaWiki": ">= 1.28.0"
},
"MessagesDirs": {
"GlobalUserPage": [
@@ -23,9 +23,6 @@
"Hooks": {
"GetPreferences": [
"GlobalUserPageHooks::onGetPreferences"
-   ],
-   "SkinTemplateNavigation::Universal": [
-   "GlobalUserPageHooks::onSkinTemplateNavigationUniversal"
],
"TitleIsAlwaysKnown": [
"GlobalUserPageHooks::onTitleIsAlwaysKnown"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f45ed0b151d3356754c0cd653163cac9907
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits