From e024e58dff56bd333c4f9d8095674cbc6da643e3 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 22 May 2008 15:44:46 +0000 Subject: [PATCH] * Remove cruft $time parameter from findFiles() * Fucking document this fucking function --- includes/filerepo/FileRepo.php | 7 +++++-- includes/filerepo/LocalRepo.php | 2 +- includes/filerepo/RepoGroup.php | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 2586a11e76..44ad17de31 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -127,9 +127,12 @@ abstract class FileRepo { } /* - * Find many files at once + * Find many files at once. Removes the corresponding titles + * of files that are found from $titles. + * @param array $titles, an array of titles + * @param int $flags */ - function findFiles( &$titles, $time = false, $flags ) { + function findFiles( &$titles, $flags ) { $result = array(); foreach ( $titles as $index => $title ) { $file = $this->findFile( $title ); diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index 950cf255be..0d7fbf00f2 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -159,7 +159,7 @@ class LocalRepo extends FSRepo { return $result; } - function findFiles( &$titles, $time = false, $flags ) { + function findFiles( &$titles, $flags ) { if ( count( $titles ) == 0 ) return array(); $dbKeys = array(); diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index df613a5a1e..938c67fa75 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -82,15 +82,15 @@ class RepoGroup { } return false; } - function findFiles( $titles, $time = false, $flags = 0 ) { + function findFiles( $titles, $flags = 0 ) { if ( !$this->reposInitialised ) { $this->initialiseRepos(); } - $images = $this->localRepo->findFiles( $titles, $time, $flags ); + $images = $this->localRepo->findFiles( $titles, $flags ); foreach ( $this->foreignRepos as $repo ) { - $images = array_merge( $images, $repo->findFiles( $titles, $time, $flags ) ); + $images = array_merge( $images, $repo->findFiles( $titles, $flags ) ); } return $images; } -- 2.20.1