Jkmartindale has uploaded a new change for review.

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

Change subject: Favorites' current method of adding itself to the personal URL 
bar conflicts with other extensions, notably Echo. Using wfArrayInsertAfter() 
allows myfavoritelist to show up after the Watchlist with minimal effort and no 
adverse effects.
......................................................................

Favorites' current method of adding itself to the personal URL bar conflicts 
with other extensions, notably Echo. Using wfArrayInsertAfter() allows 
myfavoritelist to show up after the Watchlist with minimal effort and no 
adverse effects.

Change-Id: Ic71a29f4b82f2e30c2000858425f176a5b0b3e04
---
M FavoritesHooks.php
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Favorites 
refs/changes/18/316518/2

diff --git a/FavoritesHooks.php b/FavoritesHooks.php
index d03f9db..10a2521 100644
--- a/FavoritesHooks.php
+++ b/FavoritesHooks.php
@@ -93,13 +93,9 @@
                global $wgFavoritesPersonalURL, $wgUser;
        
                if ( $wgFavoritesPersonalURL && $wgUser->isLoggedIn() ) {
-                       $url['userpage'] = array_shift( $personal_urls );
-                       $url[] = array_shift( $personal_urls );
-                       $url[] = array_shift( $personal_urls );
-       
                        $url[] = array( 'text' => wfMessage( 'myfavoritelist' 
)->text(),
                                        'href' => SpecialPage::getTitleFor( 
'Favoritelist' )->getLocalURL() );
-                       $personal_urls = $url + $personal_urls;
+                       $personal_urls = wfArrayInsertAfter( $personal_urls, 
$url, 'watchlist' );
                }
        
                return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic71a29f4b82f2e30c2000858425f176a5b0b3e04
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Favorites
Gerrit-Branch: master
Gerrit-Owner: Jkmartindale <jkmartind...@live.com>

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

Reply via email to