/* these are used extensively in SkinTemplate, but also some other places */
/**
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @return string
*/
static function makeMainPageUrl( $urlaction = '' ) {
* URL with the protocol specified.
*
* @param string $name Name of the Special page
- * @param string $urlaction Query to append
+ * @param string|string[] $urlaction Query to append
* @param string|null $proto Protocol to use or null for a local URL
* @return string
*/
/**
* @param string $name
* @param string $subpage
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @return string
*/
static function makeSpecialUrlSubpage( $name, $subpage, $urlaction = '' ) {
/**
* @param string $name
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @return string
*/
static function makeI18nUrl( $name, $urlaction = '' ) {
/**
* @param string $name
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @return string
*/
static function makeUrl( $name, $urlaction = '' ) {
/**
* this can be passed the NS number as defined in Language.php
* @param string $name
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @param int $namespace
* @return string
*/
/**
* these return an array with the 'href' and boolean 'exists'
* @param string $name
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @return array
*/
static function makeUrlDetails( $name, $urlaction = '' ) {
/**
* Make URL details where the article exists (or at least it's convenient to think so)
* @param string $name Article name
- * @param string $urlaction
+ * @param string|string[] $urlaction
* @return array
*/
static function makeKnownUrlDetails( $name, $urlaction = '' ) {
*
* @return array
*/
- function buildSidebar() {
+ public function buildSidebar() {
global $wgEnableSidebarCache, $wgSidebarCacheExpiry;
$callback = function ( $old = null, &$ttl = null ) {
return $bar;
};
- $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $msgCache = MessageCache::singleton();
+ $wanCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+
$sidebar = $wgEnableSidebarCache
- ? $cache->getWithSetCallback(
- $cache->makeKey( 'sidebar', $this->getLanguage()->getCode() ),
+ ? $wanCache->getWithSetCallback(
+ $wanCache->makeKey( 'sidebar', $this->getLanguage()->getCode() ),
$wgSidebarCacheExpiry,
$callback,
- [ 'lockTSE' => 30 ]
+ [
+ 'checkKeys' => [
+ // Unless there is both no exact $code override nor an i18n definition
+ // in the the software, the only MediaWiki page to check is for $code.
+ $msgCache->getCheckKey( $this->getLanguage()->getCode() )
+ ],
+ 'lockTSE' => 30
+ ]
)
: $callback();