ItSpiderman has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395485 )

Change subject: Fix for NSFR files
......................................................................

Fix for NSFR files

When moving file, old file should be removed from index. This File object
is created by calling LocalFile::newFromTitle which always returns
LocalFile, and not NSLocalFile in case NSFR is installed.
This causes getPath() to return filename with NS prefix, making it
impossible to remove from index.

It causes old files to remain in index as redlinks

Change-Id: I08a99a9d0ef0c2181e4a5fcddb1d06e5df448a8f
ERM: #8146
---
M ExtendedSearch/ExtendedSearch.class.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/85/395485/1

diff --git a/ExtendedSearch/ExtendedSearch.class.php 
b/ExtendedSearch/ExtendedSearch.class.php
index ab0caa7..8d1d842 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -616,9 +616,8 @@
        protected function getFileByTitle( $oTitle ) {
                $oFile = RepoGroup::singleton()->findFile( $oTitle );
                if( !$oFile ) {
-                       $oFile = LocalFile::newFromTitle(
-                               $oTitle, RepoGroup::singleton()->getLocalRepo()
-                       );
+                       $oRepo = RepoGroup::singleton()->getLocalRepo();
+                       $oFile = $oRepo->newFile( $oTitle );
                }
                return $oFile;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/395485
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08a99a9d0ef0c2181e4a5fcddb1d06e5df448a8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: ItSpiderman <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to