Last modified: 2012-05-07 17:26:44 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 T26322, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24322 - imagelinks should include ProofreadPage pages
imagelinks should include ProofreadPage pages
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ProofreadPage (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Beau
: patch, patch-reviewed
Depends on:
Blocks: Wikisource
  Show dependency treegraph
 
Reported: 2010-07-09 18:06 UTC by Bryan Tong Minh
Modified: 2012-05-07 17:26 UTC (History)
2 users (show)

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


Attachments
Add image links from Page namespace to corresponding images. (1.16 KB, patch)
2011-08-27 08:34 UTC, Beau
Details

Description Bryan Tong Minh 2010-07-09 18:06:37 UTC
Please add an entry in the imagelinks table when a page corresponding to an index is created. Do this via LinksUpdate so that GlobalUsage can properly add them to its index as well.
Comment 1 Beau 2011-08-27 08:34:47 UTC
Created attachment 8980 [details]
Add image links from Page namespace to corresponding images.

If I understood you correctly I have prepared patch which insert image links form Page namespace. For example if there is a Page:Some book.djvu/001 there will be created link to File:Some booj.djvu.

I have put the code in ParserAfterTidy hook. I am not completly certain if it is the best place to do so.

After deployment, it would be a good idea to run refreshLinks.php maintenance script, but only after bug 23287 was fixed.
Comment 2 Bryan Tong Minh 2011-08-28 16:18:07 UTC
Looks good. I don't have a PRP setup ready, but I think this will work. Two points:
* Use NS_FILE instead of NS_IMAGE
* Check if the image exists: wfFindFile( $imageTitle );
Comment 3 Beau 2011-08-28 16:45:36 UTC
I disagree with the second point. Let's assume that I had created page Page:Abc.png, and then I have uploaded File:Abc.png. There will be missing link for that file until someone edits Page:Abc.png. Maybe the extension should block creation of Page:Abc.png if corresponding file does not exist?
Comment 4 Bryan Tong Minh 2011-08-28 17:21:34 UTC
Good point. I forgot that also for regular image links is the link is registered regardless of whether the file exists.
Comment 5 Beau 2012-04-04 18:36:57 UTC
I have submitted change I6bd88f66 for review.
Comment 6 Zaran 2012-04-05 17:42:18 UTC
Thank you very much for the patch, but I am not sure I understand perfectly the need for this change.

I agree that it is important to see a link to the index page in the file page. For example you can see if a file is used on several wikisources etc. But a link for each individual page seems to be redundant: since pages of a book are direct subpages of the index page, knowing that a file is used in an index page automatically gives you the knowledge that all the pages use the same file.
Comment 7 Beau 2012-04-05 17:46:26 UTC
That might be true for multipaged documents. However under one index there may be more than one file, for example: https://pl.wikisource.org/wiki/Indeks:Jana_Kochanowskiego_dzie%C5%82a_polskie_(Lorentowicz)
Comment 8 Zaran 2012-04-05 18:14:47 UTC
That's very true, I didn't think of that. I was also afraid that having a list of 500+ links in the "file usage" section could be a bit annoying, but I guess it is not really a valid concern.

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


Navigation
Links