Merge "Clean up SpecialFilepath."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 18 Apr 2013 20:36:29 +0000 (20:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 18 Apr 2013 20:36:29 +0000 (20:36 +0000)
includes/specials/SpecialFilepath.php

index bbcced2..dc56b5a 100644 (file)
@@ -37,11 +37,11 @@ class SpecialFilepath extends SpecialPage {
                $this->outputHeader();
 
                $request = $this->getRequest();
-               $file = !is_null( $par ) ? $par : $request->getText( 'file' );
+               $file = $par ?: $request->getText( 'file' );
 
                $title = Title::newFromText( $file, NS_FILE );
 
-               if ( ! $title instanceof Title || $title->getNamespace() != NS_FILE ) {
+               if ( !( $title instanceof Title ) || $title->getNamespace() != NS_FILE ) {
                        $this->showForm( $title );
                } else {
                        $file = wfFindFile( $title );
@@ -70,7 +70,7 @@ class SpecialFilepath extends SpecialPage {
        }
 
        /**
-        * @param $title Title
+        * @param Title $title Title requested, or null.
         */
        function showForm( $title ) {
                global $wgScript;