Migrate remaining usages of Title::userCan() to PermissionManager
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index dbb1481..dcc35fc 100644 (file)
@@ -146,8 +146,7 @@ class SpecialUpload extends SpecialPage {
        }
 
        /**
-        * Special page entry point
-        * @param string $par
+        * @param string|null $par
         * @throws ErrorPageError
         * @throws Exception
         * @throws FatalError
@@ -192,11 +191,9 @@ class SpecialUpload extends SpecialPage {
                $this->loadRequest();
 
                # Unsave the temporary file in case this was a cancelled upload
-               if ( $this->mCancelUpload ) {
-                       if ( !$this->unsaveUploadedFile() ) {
-                               # Something went wrong, so unsaveUploadedFile showed a warning
-                               return;
-                       }
+               if ( $this->mCancelUpload && !$this->unsaveUploadedFile() ) {
+                       # Something went wrong, so unsaveUploadedFile showed a warning
+                       return;
                }
 
                # Process upload or show a form