Last modified: 2014-09-17 02:01:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11887, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9887 - Allow namespace and category designation for Images/files - and subsequent namespace/category-based functionality enhancement with images
Allow namespace and category designation for Images/files - and subsequent na...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.10.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks: 9845
  Show dependency treegraph
 
Reported: 2007-05-12 20:28 UTC by Jack D. Pond
Modified: 2014-09-17 02:01 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Contains required patch files (in diff formats) and actual files (58.34 KB, application/octet-stream)
2007-05-12 20:30 UTC, Jack D. Pond
Details
Patches required to SpecialUpload (2.71 KB, patch)
2007-05-12 20:36 UTC, Jack D. Pond
Details
Image.php patches (1.21 KB, patch)
2007-05-12 20:37 UTC, Jack D. Pond
Details
ImageFunctions.php patches (2.47 KB, patch)
2007-05-12 20:37 UTC, Jack D. Pond
Details
Title.php (493 bytes, patch)
2007-05-12 20:38 UTC, Jack D. Pond
Details
img_auth.php patch - not recommended, pref new img_authNS.php (3.16 KB, patch)
2007-05-12 20:47 UTC, Jack D. Pond
Details
img_authNS.php alternative to img_auth.php (3.22 KB, text/plain)
2007-05-12 20:51 UTC, Jack D. Pond
Details
SpecialUpload.php Patches - corrected (2.78 KB, patch)
2007-05-13 12:20 UTC, Jack D. Pond
Details
All patches in a single diff file - as per simetrical (13.20 KB, patch)
2007-05-13 12:29 UTC, Jack D. Pond
Details
Contains required patch files (in diff formats) and actual files (56.72 KB, application/octet-stream)
2007-05-13 23:47 UTC, Jack D. Pond
Details
All patches in a single diff file - as per simetrical (7.29 KB, patch)
2007-05-13 23:48 UTC, Jack D. Pond
Details

Description Jack D. Pond 2007-05-12 20:28:00 UTC
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).
Comment 1 Jack D. Pond 2007-05-12 20:30:11 UTC
Created attachment 3624 [details]
Contains required patch files (in diff formats) and actual files

Contains the diff files necessary to complete
Comment 2 Jack D. Pond 2007-05-12 20:36:10 UTC
Created attachment 3625 [details]
Patches required to SpecialUpload
Comment 3 Jack D. Pond 2007-05-12 20:37:03 UTC
Created attachment 3626 [details]
Image.php patches

Patches required for image.php
Comment 4 Jack D. Pond 2007-05-12 20:37:38 UTC
Created attachment 3627 [details]
ImageFunctions.php patches
Comment 5 Jack D. Pond 2007-05-12 20:38:44 UTC
Created attachment 3628 [details]
Title.php

Patches required for Title
Comment 6 Jack D. Pond 2007-05-12 20:47:16 UTC
Created attachment 3630 [details]
img_auth.php patch - not recommended, pref new img_authNS.php
Comment 7 Jack D. Pond 2007-05-12 20:51:10 UTC
Created attachment 3631 [details]
img_authNS.php alternative to img_auth.php

alternative
Comment 8 Jack D. Pond 2007-05-12 22:25:16 UTC
TimStarling is updating the file repository handling process, will include ability to do this via extension 
versus patching - highly desireable.  Included patches with this bug can be applied against 1.10.

TimStarling: after image changes, I think you might be able to implement this as a plug-in repository, well, 
plus any UI changes, but I don't think you'll have to make backend patches.  The way it works is that you 
specify a repository class to be used as the local repository
Comment 9 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-13 01:27:59 UTC
Diffs should normally be placed in one file so they can be read and applied 
more easily.
Comment 10 Jack D. Pond 2007-05-13 12:20:04 UTC
Created attachment 3632 [details]
SpecialUpload.php Patches - corrected

Had typo in orignal patch - accidently uploaded wrong version
Comment 11 Jack D. Pond 2007-05-13 12:29:20 UTC
Created attachment 3633 [details]
All patches in a single diff file - as per simetrical

Includes patches to img_auth.php - not preferred, should use img_authNS.php as
alternative.
Comment 12 Jack D. Pond 2007-05-13 23:47:10 UTC
Created attachment 3636 [details]
Contains required patch files (in diff formats) and actual files

Fixed bug in non-namespace typo
Comment 13 Jack D. Pond 2007-05-13 23:48:37 UTC
Created attachment 3637 [details]
All patches in a single diff file - as per simetrical

Fixed minor bug in non-namespace typos
Comment 14 Brion Vibber 2007-05-14 15:10:39 UTC
This seems too hierarchical and hard-wired, the opposite of the sort of
categorization and tagging we like to see on a wiki.

I don't see it as being very useful.
Comment 15 Jack D. Pond 2009-09-04 22:03:57 UTC
Was able to use TimStarling's FileRepo system to create a new local Repo - NSFileRepo.  As of 1.16.0, will require no patches to implement.  Minor patching reqiured for versions 1.13.0 through 1.15.1

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links