Remove unused array index, add a couple of braces
authorSam Reed <reedy@users.mediawiki.org>
Tue, 12 Oct 2010 22:48:22 +0000 (22:48 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 12 Oct 2010 22:48:22 +0000 (22:48 +0000)
includes/filerepo/FileRepo.php

index c65b403..6fd7790 100644 (file)
@@ -163,7 +163,7 @@ abstract class FileRepo {
         */
        function findFiles( $items ) {
                $result = array();
-               foreach ( $items as $index => $item ) {
+               foreach ( $items as $item ) {
                        if ( is_array( $item ) ) {
                                $title = $item['title'];
                                $options = $item;
@@ -173,8 +173,9 @@ abstract class FileRepo {
                                $options = array();
                        }
                        $file = $this->findFile( $title, $options );
-                       if ( $file )
+                       if ( $file ) {
                                $result[$file->getTitle()->getDBkey()] = $file;
+                       }
                }
                return $result;
        }