Last modified: 2013-09-19 00:12:35 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 T40468, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38468 - Store urls from $wgAllowExternalImages in some link tracking table
Store urls from $wgAllowExternalImages in some link tracking table
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 10:24 UTC by Subfader
Modified: 2013-09-19 00:12 UTC (History)
3 users (show)

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


Attachments

Description Subfader 2012-07-18 10:24:15 UTC
I use $wgAllowExternalImages = true; http://www.mediawiki.org/wiki/Manual:$wgAllowExternalImages

There is no way to maintain the embedded external images (list all / find dead ones).

The URLs should be stored in the externallinks table at least.

If you think externallinks should be for real link URLs only, add a new special page to list all externally embedded images (when $wgAllowExternalImages = true).

But I think the table is perfect for it. It stores external URLs.

MW 1.18.0 here but this should apply to all versions.

May also apply to:
$wgAllowImageTag
$wgAllowExternalImagesFrom
$wgEnableImageWhitelist
Comment 1 Subfader 2012-07-18 12:56:01 UTC
Solution: Linker::makeExternalImage() becomes a linked image.

Problem: I don't know how to add/update that entry in the 'externallinks' table
Comment 2 Bryan Tong Minh 2012-07-18 18:19:18 UTC
(In reply to comment #1)
> Solution: Linker::makeExternalImage() becomes a linked image.
> 
> Problem: I don't know how to add/update that entry in the 'externallinks' table

This is typically done in the Parser rather than in the linker, by adding the links to the local ParserOutput object.
Comment 3 Subfader 2012-07-19 06:38:46 UTC
Thanks. I just copied


				# Register it in the output object...
				# Replace unnecessary URL escape codes with their equivalent characters
				$pasteurized = self::replaceUnusualEscapes( $url );
				$this->mOutput->addExternalLink( $pasteurized );

from makeFreeExternalLink() and added it below 

				$text = Linker::makeExternalImage( $url );

in maybeMakeExternalImage()

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


Navigation
Links