Check if SpecialMobileWatchlist exist
If MobileFrontend doesn't exist this will throw an error Bug: T171241 Change-Id: Ie61cfa61b78a53598ac59aea15c8a4e6a261238d
This commit is contained in:
parent
f08b6defd7
commit
d5e09c91e9
|
@ -470,6 +470,8 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||
$watchlistQuery = [];
|
||||
$user = $this->getUser();
|
||||
if ( $user ) {
|
||||
// Avoid fatal when MobileFrontend not available (T171241)
|
||||
if ( class_exists( 'SpecialMobileWatchlist' ) ) {
|
||||
$view = $user->getOption( SpecialMobileWatchlist::VIEW_OPTION_NAME, false );
|
||||
$filter = $user->getOption( SpecialMobileWatchlist::FILTER_OPTION_NAME, false );
|
||||
if ( $view ) {
|
||||
|
@ -479,6 +481,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||
$watchlistQuery['filter'] = $filter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$menu->insert( 'watchlist', $isJSOnly = true )
|
||||
->addComponent(
|
||||
|
|
Loading…
Reference in New Issue