summaryrefslogtreecommitdiff
path: root/includes/filerepo/LocalRepo.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/filerepo/LocalRepo.php
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/filerepo/LocalRepo.php')
-rw-r--r--includes/filerepo/LocalRepo.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index 6c4d21a2..02883c53 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -1,12 +1,22 @@
<?php
/**
+ * Local repository that stores files in the local filesystem and registers them
+ * in the wiki's own database.
+ *
+ * @file
+ * @ingroup FileRepo
+ */
+
+/**
* A repository that stores files in the local filesystem and registers them
* in the wiki's own database. This is the most commonly used repository class.
* @ingroup FileRepo
*/
class LocalRepo extends FSRepo {
var $fileFactory = array( 'LocalFile', 'newFromTitle' );
+ var $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
var $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
+ var $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
@@ -71,7 +81,7 @@ class LocalRepo extends FSRepo {
/**
* Checks if there is a redirect named as $title
*
- * @param Title $title Title of image
+ * @param $title Title of file
*/
function checkRedirect( $title ) {
global $wgMemc;
@@ -156,9 +166,11 @@ class LocalRepo extends FSRepo {
);
$result = array();
- while ( $row = $res->fetchObject() )
+ foreach ( $res as $row ) {
$result[] = $this->newFileFromRow( $row );
+ }
$res->free();
+
return $result;
}
@@ -189,8 +201,8 @@ class LocalRepo extends FSRepo {
/**
* Invalidates image redirect cache related to that image
*
- * @param Title $title Title of image
- */
+ * @param $title Title of page
+ */
function invalidateImageRedirect( $title ) {
global $wgMemc;
$memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) );