* (bug 25670) wfFindFile() now checks the namespace of the given title, only "File" and "Media" are allowed now
The problem with bug 19944 was that the cache in RepoGroup was holding a file with a Title that has its namespace set to NS_MEDIA; the cache is now only used for title with namespace set to NS_FILE.
Also modified ImageGallery to not call wfFindFile() on non-NS_FILE title; was obviously breaking the above fix.
* (bug 17789) Added a note to the total views on Special:Statistics saying that
is doesn't count non-existing pages and special pages
* (bug 17996) HTTP redirects are now combined when requesting a special page
+* (bug 19944) Link on image thumbnails no longer link to "Media:" namespace in
+ some cases
+* (bug 25670) wfFindFile() now checks the namespace of the given title, only
+ "File" and "Media" are allowed now
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
$time = $descQuery = false;
wfRunHooks( 'BeforeGalleryFindFile', array( &$this, &$nt, &$time, &$descQuery ) );
- $img = wfFindFile( $nt, array( 'time' => $time ) );
+ if ( $nt->getNamespace() == NS_FILE ) {
+ $img = wfFindFile( $nt, array( 'time' => $time ) );
+ } else {
+ $img = false;
+ }
- if( $nt->getNamespace() != NS_FILE || !$img ) {
+ if( !$img ) {
# We're dealing with a non-image, spit out the name and be done with it.
$thumbhtml = "\n\t\t\t".'<div style="height: '.($this->mHeights*1.25+2).'px;">'
. htmlspecialchars( $nt->getText() ) . '</div>';
}
}
+ if ( $title->getNamespace() != NS_MEDIA && $title->getNamespace() != NS_FILE ) {
+ throw new MWException( __METHOD__ . ' recieved an Title object with incorrect namespace' );
+ }
+
# Check the cache
if ( empty( $options['ignoreRedirect'] )
&& empty( $options['private'] )
- && empty( $options['bypassCache'] ) )
+ && empty( $options['bypassCache'] )
+ && $title->getNamespace() == NS_FILE )
{
$useCache = true;
$time = isset( $options['time'] ) ? $options['time'] : '';