diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2004-12-19 08:00:50 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2004-12-19 08:00:50 +0000 |
commit | 64ac6b8e775dd8582ea9cc5f24235488f076c5b3 (patch) | |
tree | 95335217590f2a3fb39785ce32fe56ba5a11b018 /includes/ImagePage.php | |
parent | c05eeb66755f74272b4a5f82acc6caaeafc0fb54 (diff) | |
download | mediawikicore-64ac6b8e775dd8582ea9cc5f24235488f076c5b3.tar.gz mediawikicore-64ac6b8e775dd8582ea9cc5f24235488f076c5b3.zip |
Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/6710
Diffstat (limited to 'includes/ImagePage.php')
-rw-r--r-- | includes/ImagePage.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 3609c0073be0..e99e046aa332 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -144,11 +144,11 @@ class ImagePage extends Article { $wgOut->addHTML( '<h2>' . wfMsg( 'imagelinks' ) . "</h2>\n" ); $dbr =& wfGetDB( DB_SLAVE ); - $cur = $dbr->tableName( 'cur' ); + $page = $dbr->tableName( 'page' ); $imagelinks = $dbr->tableName( 'imagelinks' ); - $sql = "SELECT cur_namespace,cur_title FROM $imagelinks,$cur WHERE il_to=" . - $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=cur_id" + $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" . + $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=page_id" . " LIMIT 500"; # quickie emergency brake $res = $dbr->query( $sql, DB_SLAVE, "Article::imageLinks" ); @@ -160,7 +160,7 @@ class ImagePage extends Article { $sk = $wgUser->getSkin(); while ( $s = $dbr->fetchObject( $res ) ) { - $name = Title::MakeTitle( $s->cur_namespace, $s->cur_title ); + $name = Title::MakeTitle( $s->page_namespace, $s->page_title ); $link = $sk->makeKnownLinkObj( $name, "" ); $wgOut->addHTML( "<li>{$link}</li>\n" ); } @@ -188,11 +188,10 @@ class ImagePage extends Article { # Better double-check that it hasn't been deleted yet! $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) ); - if ( !is_null( $image ) ) { - if ( '' == trim( $image ) ) { - $wgOut->fatalError( wfMsg( 'cannotdelete' ) ); - return; - } + if ( ( !is_null( $image ) ) + && ( '' == trim( $image ) ) ) { + $wgOut->fatalError( wfMsg( 'cannotdelete' ) ); + return; } # Deleting old images doesn't require confirmation |