Page MenuHomePhabricator

diff-upload-namespace-images

Authored By
bzimport
Nov 21 2014, 11:04 PM
Size
854 B
Referenced Files
None
Subscribers
None

diff-upload-namespace-images

For Special:Upload ($isUpload), use NS_IMAGE instead of NS_SPECIAL namespace.
Reason:
With NS_IMAGE, SelectCategory will use the root category for the File: namespace
With NS_SPECIAL, it will display _all_ categories - which doesn't make sense for file uploads
Index: SelectCategory_body.php
===================================================================
--- SelectCategory_body.php (Revision 115608)
+++ SelectCategory_body.php (Arbeitskopie)
@@ -37,7 +38,7 @@
$skin = $wgUser->getSkin();
# Get all categories from wiki
- $allCats = self::getAllCategories( $isUpload ? NS_SPECIAL : $pageObj->mTitle->getNamespace() );
+ $allCats = self::getAllCategories( $isUpload ? NS_IMAGE : $pageObj->mTitle->getNamespace() );
# Load system messages
# Get the right member variables, depending on if we're on an upload form or not

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6250
Default Alt Text
diff-upload-namespace-images (854 B)

Event Timeline