jenkins-bot has submitted this change and it was merged.

Change subject: Edit Personal URL injection to play nicer with other extensions
......................................................................


Edit Personal URL injection to play nicer with other extensions

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(-)

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



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: merged
Gerrit-Change-Id: Ic71a29f4b82f2e30c2000858425f176a5b0b3e04
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Favorites
Gerrit-Branch: master
Gerrit-Owner: Jkmartindale <jkmartind...@live.com>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: jlemley <jlem...@gmail.com>

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

Reply via email to