Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F6711
diff-upload-namespace-images
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:04 PM
2014-11-21 23:04:52 (UTC+0)
Size
854 B
Referenced Files
None
Subscribers
None
diff-upload-namespace-images
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6250
Default Alt Text
diff-upload-namespace-images (854 B)
Attached To
Mode
T26911: $wgSelectCategoryRoot ignored on Special:Upload
Attached
Detach File
Event Timeline
Log In to Comment