* (bug 26733) Wrap initial table creation in transaction
* (bug 26729) Category pages should return 404 if they do not exist and have no
members.
+* (bug 2585) Image pages should send 404 if no image, no shared image and no
+ description page.
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result
{
$nofile = 'filepage-nofile';
}
+ // Note, if there is an image description page, but
+ // no image, then this setRobotPolicy is overriden
+ // by Article::View().
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->wrapWikiMsg( "<div id='mw-imagepage-nofile' class='plainlinks'>\n$1\n</div>", $nofile );
+ if ( !$this->getID() ) {
+ // If there is no image, no shared image, and no description page,
+ // output a 404, to be consistent with articles.
+ $wgRequest->response()->header( "HTTP/1.x 404 Not Found" );
+ }
}
}