From 7d14d3f46dd2426605dd4874ce50ebef37723e3a Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 16 Apr 2013 17:12:15 -0400 Subject: [PATCH] Clean up SpecialFilepath. Prompted by comments on https://gerrit.wikimedia.org/r/59050 which identified problems with code lifted directly from SpecialFilepath. Change-Id: Iab8a5d3d007b3aca72b7c6c1145d830a74b4399e --- includes/specials/SpecialFilepath.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialFilepath.php b/includes/specials/SpecialFilepath.php index bbcced2666..dc56b5ae5b 100644 --- a/includes/specials/SpecialFilepath.php +++ b/includes/specials/SpecialFilepath.php @@ -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; -- 2.20.1