First step in replacing NS_IMAGE with NS_FILE, to match the canonical name change...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Thu, 27 Nov 2008 22:36:25 +0000 (22:36 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Thu, 27 Nov 2008 22:36:25 +0000 (22:36 +0000)
commit112f2e6a5012a665955689cafa16444853a9921f
tree90f82d6a0748754e5f416133c127d6250a91ef08
parent48730864ba6385fd4cff42f1e2804b716911e242
First step in replacing NS_IMAGE with NS_FILE, to match the canonical name change (bug 44).

This step simply defines the new constants NS_FILE and NS_FILE_TALK, retaining NS_IMAGE and NS_IMAGE_TALK as aliases, and makes them usable for export (which seems to be the only part of core that uses the NS_* names as strings).

The second step should be a global search-and-replace across core (other than Defines.php and Export.php).  I've already tried this locally, and there seem to be no problems.  This step should not touch extensions.

The third, optional step would be updating at least some extensions to use the new constant names as well.  This would generally require prepending the following compatibility snippet to the main extension file:

// The names NS_FILE and NS_FILE_TALK are new in MediaWiki v1.14
if( !defined('NS_FILE') || !defined('NS_FILE_TALK') ) {
define('NS_FILE', NS_IMAGE);
define('NS_FILE_TALK', NS_IMAGE_TALK);
}
RELEASE-NOTES
includes/Defines.php
includes/Export.php