If namespaces were allowed as sub-categorization of images, a large number of features could be
enabled through extensions and other customization, including:
- Namespace protection on images
- Categorization, sorting, search by namespace (and category) of images
- Tree-structuring of images (eg, sub-directory type listings using NS and designated categories)
The proposed mechanism would be two-fold:
- Allow namespace in image link (eg., Image:[ns]:[Image Name])
- Include namespace in file hash (eg., [ns]/[category]/[hash]/file.img
This functionality can be implemented by patching 4 files and is completely reverse compatible with
previoius versions. Additionally, the proposed patches require this functionality to be enabled
(disabled by default), and poses almost no overhead when not used.
It provides a platform for much needed image categorization, including enhanced listing and
segregation with very little cost.
Modifications:
SpecialUpload.php - modify to allow uploading of image using [ns]:[Image Name] format, assign to
ns, and save in [ns]/[category]/[hash]/file.img hashed format
Image.php - parse ns/category in image reference (if exists)
ImageFunctions.php - parse ns/category in image reference (if exists)
Title.php - needs two set property functions
Optional:
img_auth.php - enhance to use enhanced hashing or (preferable), new img_authNS.php which does same
with NS protection checking (old img_auth would still work, just wouldn't have
overhead/functionality of NS checking).
Version: 1.10.x
Severity: enhancement