SkinTemplate: Add $this as a parameter to PersonalUrls hook
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 16 Nov 2013 12:36:24 +0000 (13:36 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 16 Nov 2013 12:36:24 +0000 (13:36 +0100)
Change-Id: I1116fd64ea0beac148ee75ea4ec050741fc2c3b7

docs/hooks.txt
includes/SkinTemplate.php

index d56886c..30b9b72 100644 (file)
@@ -1909,6 +1909,7 @@ that tests continue to run properly.
 my talk page, my contributions" etc).
 &$personal_urls: Array of link specifiers (see SkinTemplate.php)
 &$title: Title object representing the current page
+$skin: Skin object providing context (e.g. to check if the user is logged in, etc.)
 
 'PingLimiter': Allows extensions to override the results of User::pingLimiter().
 &$user : User performing the action
index 77ea307..0990584 100644 (file)
@@ -741,7 +741,7 @@ class SkinTemplate extends Skin {
                        $personal_urls[$login_id] = $login_url;
                }
 
-               wfRunHooks( 'PersonalUrls', array( &$personal_urls, &$title ) );
+               wfRunHooks( 'PersonalUrls', array( &$personal_urls, &$title, $this ) );
                wfProfileOut( __METHOD__ );
                return $personal_urls;
        }