Last modified: 2014-02-12 23:38:25 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 T45632, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43632 - Make SRF support foreign image repos
Make SRF support foreign image repos
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
master
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-04 14:33 UTC by Leonard Wallentin
Modified: 2014-02-12 23:38 UTC (History)
4 users (show)

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


Attachments

Description Leonard Wallentin 2013-01-04 14:33:28 UTC
The gallery format of Semantic Result Formats (http://semantic-mediawiki.org/wiki/Help:Gallery_format) could be made to support foreign file repos, such as http://www.mediawiki.org/wiki/InstantCommons, where local file pages are probably missing most of the time.

This is currently prevented by line 257 in SRF_Gallery.php:
  if ( $imgTitle->exists() ) {

We still need to check that the file exists, of course. Not sure what the best method is. Maybe something like this:

  $imgFile = wfFindFile( $imgTitle );
  if ( $imgFile && $imgFile->isVisible() ) {
Comment 1 Leonard Wallentin 2013-01-10 14:22:45 UTC
Another user just posted a demonstration of the problem here: 

http://scratchpad.referata.com/w/index.php?title=Testask
Comment 2 Uimanov Aleksey 2013-01-11 09:40:29 UTC
I am the user who posted demonstration above.

You are writing 

> This is currently prevented by line 257 in SRF_Gallery.php:
>   if ( $imgTitle->exists() ) {

> We still need to check that the file exists, of course. Not sure what the best
> method is. Maybe something like this:

>   $imgFile = wfFindFile( $imgTitle );
>   if ( $imgFile && $imgFile->isVisible() ) {


This code belongs to function addImageProperties, but using debug printing i have figured out that it does not even called.

So i belive the guilty code is 

if ( $this->params['imageproperty'] !== '' && in_array( $this->params['imageproperty'], $printReqLabels ) || $this->params['redirects'] !== '' && in_array( $this->params['redirects'], $printReqLabels ) ) {

at line 148 of SRF_Gallery.php

Actually, I dont even understand what this condition checks. All after the 

    $this->params['imageproperty'] !== ''

code.
Comment 3 Leonard Wallentin 2013-01-11 10:10:56 UTC
However, if I understood the mailing list conversation correctly, the problem Uimanov Aleksey is experiencing, does not have with this bug (a suggestion to make foreign repos work) to do.

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


Navigation
Links