Fixed method name casing and IDEA warnings in FileRepo
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 19 Sep 2016 02:12:05 +0000 (19:12 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 19 Sep 2016 07:54:52 +0000 (07:54 +0000)
Change-Id: I463885a9f425491cd040cb1cdbc4c16925522848

includes/filerepo/RepoGroup.php
includes/filerepo/file/LocalFile.php

index d515b05..bd32de0 100644 (file)
@@ -135,17 +135,18 @@ class RepoGroup {
                }
 
                # Check the cache
+               $dbkey = $title->getDBkey();
                if ( empty( $options['ignoreRedirect'] )
                        && empty( $options['private'] )
                        && empty( $options['bypassCache'] )
                ) {
                        $time = isset( $options['time'] ) ? $options['time'] : '';
-                       $dbkey = $title->getDBkey();
                        if ( $this->cache->has( $dbkey, $time, 60 ) ) {
                                return $this->cache->get( $dbkey, $time );
                        }
                        $useCache = true;
                } else {
+                       $time = false;
                        $useCache = false;
                }
 
index f3980f3..396b47c 100644 (file)
@@ -2694,7 +2694,7 @@ class LocalFileRestoreBatch {
                                // Even if some files could be copied, fail entirely as that is the
                                // easiest thing to do without data loss
                                $this->cleanupFailedBatch( $storeStatus, $storeBatch );
-                               $status->setOk( false );
+                               $status->setOK( false );
                                $this->file->unlock();
 
                                return $status;