HomePhabricator

Convert DeleteBatch to use extension registration

Authored by MarcoAurelio on Nov 17 2017, 6:17 PM.

Description

Convert DeleteBatch to use extension registration

Bug: T180818
Change-Id: Ibca3f2d3bbb4c9b6128a26ed6c95f50c1ea310f0

Details

Committed
MarcoAurelioJan 8 2018, 9:17 AM
Parents
rEDBA0f048975fad0: Use SPDX 3.0 license identifier
Branches
Unknown
Tags
Unknown
References
refs/changes/81/392081/6
ChangeId
Ibca3f2d3bbb4c9b6128a26ed6c95f50c1ea310f0

Event Timeline

Kghbln added a subscriber: Kghbln.Jan 19 2018, 11:43 PM

@MarcoAurelio You renamed the extension from "Delete Batch" to "DeleteBatch". This should be fixed since it makes tracking messy. [1] as opposed to [2]

[1] https://wikiapiary.com/wiki/Extension:Delete_Batch
[2] https://wikiapiary.com/wiki/Extension:DeleteBatch

@Kghbln The reason why a space in the extension name attribute is bad is because it requires the folder that the extension exists in to have a space too, which makes things more difficult on the command line, not to mention that it requires the git repository to have a space in its name as well. Not doing so would cause incorrect folder names when cloning. Additionally, the way wfLoadExtension() works is that it uses the given argument to look for an extension; Delete Batch would result in MediaWiki looking for a folder Delete Batch in the extension folder, which won't work, because the extension folder name is DeleteBatch. Using wfLoadExtension( 'DeleteBatch' ) works, but that is counter-intuïtive. Further, checking if an extension is loaded using the extension registry yields true for Delete Batch but false for DeleteBatch. It is the same problem with https://gerrit.wikimedia.org/r/#/c/402580/ too.

@Kghbln The reason why a space in the extension name attribute is bad is because it requires the folder that the extension exists in to have a space too,

This is incorrect. The "name" setting is just for extension credits. What is passed to wfLoadExtension( ... ) is purely the local directory name.