ItSpiderman has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/395489 )
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: Ia515729f4310e09ba3970381a5f4d6cc84612a1e
ERM: #8146
---
M ExtendedSearch/ExtendedSearch.class.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/89/395489/1
diff --git a/ExtendedSearch/ExtendedSearch.class.php
b/ExtendedSearch/ExtendedSearch.class.php
index 6fd06f7..eed6524 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -437,7 +437,8 @@
}
// Moving file if namespace of title is the file
namespace
if ( $oTitle->getNamespace() == NS_FILE ) {
- $oOldFile = LocalFile::newFromTitle( $oTitle,
RepoGroup::singleton()->getLocalRepo() );
+ $oRepo = RepoGroup::singleton()->getLocalRepo();
+ $oOldFile = $oRepo->newFile( $oTitle );
$oNewFile = RepoGroup::singleton()->findFile(
$oNewtitle );
BuildIndexMainControl::getInstance()->deleteIndexFile( $oOldFile->getPath(),
'repo' );
--
To view, visit https://gerrit.wikimedia.org/r/395489
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia515729f4310e09ba3970381a5f4d6cc84612a1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: ItSpiderman <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits