mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Fix remote page detection logic
Remote pages can be global user pages, etc., not restricted to files on Commons. Change-Id: I89368c93e25ca970bf35ad742a1054473b6d6c48
This commit is contained in:
parent
c0176c9a12
commit
90ccc475df
|
@ -551,8 +551,7 @@ class Hooks implements TextSlotDiffRendererTablePrefixHook {
|
|||
// us to splice into the middle of an associative array.
|
||||
$newViews = [];
|
||||
$wikiPageFactory = $services->getWikiPageFactory();
|
||||
$isRemote = $title->inNamespace( NS_FILE ) &&
|
||||
!$wikiPageFactory->newFromTitle( $title )->isLocal();
|
||||
$isRemote = !$wikiPageFactory->newFromTitle( $title )->isLocal();
|
||||
foreach ( $links['views'] as $action => $data ) {
|
||||
if ( $action === 'edit' ) {
|
||||
// Build the VisualEditor tab
|
||||
|
|
Loading…
Reference in a new issue