From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- includes/filerepo/OldLocalFile.php | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'includes/filerepo/OldLocalFile.php') diff --git a/includes/filerepo/OldLocalFile.php b/includes/filerepo/OldLocalFile.php index 35f3f9f2..9efe998f 100644 --- a/includes/filerepo/OldLocalFile.php +++ b/includes/filerepo/OldLocalFile.php @@ -1,4 +1,10 @@ $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 { @@ -70,10 +74,10 @@ class OldLocalFile extends LocalFile { } /** - * @param Title $title - * @param FileRepo $repo - * @param string $time Timestamp or null to load by archive name - * @param string $archiveName Archive name or null to load by timestamp + * @param $title Title + * @param $repo FileRepo + * @param $time String: timestamp or null to load by archive name + * @param $archiveName String: archive name or null to load by timestamp */ function __construct( $title, $repo, $time, $archiveName ) { parent::__construct( $title, $repo ); @@ -135,7 +139,7 @@ class OldLocalFile extends LocalFile { } function getUrlRel() { - return 'archive/' . $this->getHashPath() . urlencode( $this->getArchiveName() ); + return 'archive/' . $this->getHashPath() . rawurlencode( $this->getArchiveName() ); } function upgradeRow() { @@ -172,8 +176,8 @@ class OldLocalFile extends LocalFile { } /** - * int $field one of DELETED_* bitfield constants - * for file or revision rows + * @param $field Integer: one of DELETED_* bitfield constants + * for file or revision rows * @return bool */ function isDeleted( $field ) { @@ -193,7 +197,8 @@ class OldLocalFile extends LocalFile { /** * Determine if the current user is allowed to view a particular * field of this image file, if it's marked as deleted. - * @param int $field + * + * @param $field Integer * @return bool */ function userCan( $field ) { -- cgit v1.2.3-54-g00ecf