Revert "jquery.textSelection: Remove hardcoded checks for removed WikiEditor iframe...
[lhc/web/wiklou.git] / includes / WikiFilePage.php
index 2b192b0..44f0599 100644 (file)
@@ -47,7 +47,7 @@ class WikiFilePage extends WikiPage {
        }
 
        /**
-        * @param $file File:
+        * @param File $file
         */
        public function setFile( $file ) {
                $this->mFile = $file;
@@ -85,7 +85,8 @@ class WikiFilePage extends WikiPage {
                if ( $from == $to ) {
                        return null;
                }
-               return $this->mRedirectTarget = Title::makeTitle( NS_FILE, $to );
+               $this->mRedirectTarget = Title::makeTitle( NS_FILE, $to );
+               return $this->mRedirectTarget;
        }
 
        /**
@@ -142,7 +143,8 @@ class WikiFilePage extends WikiPage {
                }
                $hash = $this->mFile->getSha1();
                if ( !( $hash ) ) {
-                       return $this->mDupes = array();
+                       $this->mDupes = array();
+                       return $this->mDupes;
                }
                $dupes = RepoGroup::singleton()->findBySha1( $hash );
                // Remove duplicates with self and non matching file sizes
@@ -205,7 +207,7 @@ class WikiFilePage extends WikiPage {
                $file = $this->mFile;
 
                if ( ! $file instanceof LocalFile ) {
-                       wfDebug( __CLASS__ . '::' . __METHOD__ . ' is not supported for this file' );
+                       wfDebug( __CLASS__ . '::' . __METHOD__ . " is not supported for this file\n" );
                        return TitleArray::newFromResult( new FakeResultWrapper( array() ) );
                }