* (bug 23293) Do not show change tags when special:recentchanges(linked)
or special:newpages is transcluded into another page as it messes up the
page.
+* (bug 24517) LocalFile::newFromKey() and OldLocalFile::newFromKey() no longer
+ throw fatal errors
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
* Do not call this except from inside a repo class.
*/
static function newFromKey( $sha1, $repo, $timestamp = false ) {
- # Polymorphic function name to distinguish foreign and local fetches
- $fname = get_class( $this ) . '::' . __FUNCTION__;
-
$conds = array( 'img_sha1' => $sha1 );
if( $timestamp ) {
$conds['img_timestamp'] = $timestamp;
}
- $row = $dbr->selectRow( 'image', $this->getCacheFields( 'img_' ), $conds, $fname );
+ $dbr = $repo->getSlaveDB();
+ $row = $dbr->selectRow( 'image', self::selectFields(), $conds, __METHOD__ );
if( $row ) {
return self::newFromRow( $row, $repo );
} else {
}
static function newFromKey( $sha1, $repo, $timestamp = false ) {
- # Polymorphic function name to distinguish foreign and local fetches
- $fname = get_class( $this ) . '::' . __FUNCTION__;
-
$conds = array( 'oi_sha1' => $sha1 );
if( $timestamp ) {
$conds['oi_timestamp'] = $timestamp;
}
- $row = $dbr->selectRow( 'oldimage', $this->getCacheFields( 'oi_' ), $conds, $fname );
+ $dbr = $repo->getSlaveDB();
+ $row = $dbr->selectRow( 'oldimage', self::selectFields(), $conds, __METHOD__ );
if( $row ) {
return self::newFromRow( $row, $repo );
} else {