Last modified: 2011-03-13 18:05:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3181 - Addition of "Link to" link list to upload warning page
Addition of "Link to" link list to upload warning page
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2005-08-17 20:10 UTC by Andy Somerville
Modified: 2011-03-13 18:05 UTC (History)
1 user (show)

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


Description Andy Somerville 2005-08-17 20:10:49 UTC
I added the list of pages which link to the image/file that a person is
attempting to overwrite/revise to provide context that might keep users from
accidentally revising the incorrect file.
Comment 1 Andy Somerville 2005-08-17 20:20:17 UTC
requires that the page title be made as a class member... done here as the
variable "nt" (used because I found it already used in another function... I
just made it a class member.

Didnt include diff because of this file was changed from the 1.4.7 original
which itself is different from the 1.5 version

function uploadWarning( $warning ) {
                // other code
                $wgOut->addHTML( '<h2 id="filelinks">' . wfMsg( 'imagelinks' ) .
"</h2>\n" );

                $dbr =& wfGetDB( DB_SLAVE );
                $page = $dbr->tableName( 'page' );
                $imagelinks = $dbr->tableName( 'imagelinks' );

                $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page
WHERE il_to=" .
                $dbr->addQuotes( $this->nt->getDBkey() ) . " AND il_from=page_id"
                . " LIMIT 500"; # quickie emergency brake
                $res = $dbr->query( $sql, "ImagePage::imageLinks" );

                if ( 0 == $dbr->numRows( $res ) ) {
                        $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) .
"</p>\n" );
                $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) .  "</p>\n<ul>" );

                $sk = $wgUser->getSkin();
                while ( $s = $dbr->fetchObject( $res ) ) {
                       $name = Title::MakeTitle( $s->page_namespace,
$s->page_title );
                       $link = $sk->makeKnownLinkObj( $name, "" );
                       $wgOut->addHTML( "<li>{$link}</li>\n<br>\n" );
                $wgOut->addHTML( "</ul>\n" );
                // other code
Comment 2 Brion Vibber 2006-02-03 06:31:32 UTC
Not sure what this is trying to accomplish.

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