/**
* Gets the context this SpecialPage is executed in
*
- * @return IContextSource
+ * @return IContextSource|RequestContext
* @since 1.18
*/
public function getContext() {
* @param $talkpage Title: Talk page
* @param $target User: Target user object
* @param $subject User: The viewing user ($wgUser might be still checked in some cases)
+ * @return array
*/
public static function getUserLinks( Title $userpage, Title $talkpage, User $target, User $subject ) {
return $revLens;
}
+ /**
+ * @return string
+ */
function getStartBody() {
return "<ul>\n";
}
+ /**
+ * @return string
+ */
function getEndBody() {
return "</ul>\n";
}
# Prepare language selection links as needed
if( $wgLoginLanguageSelector ) {
$template->set( 'languages', $this->makeLanguageSelector() );
- if( $this->mLanguage )
+ if( $this->mLanguage ) {
$template->set( 'uselang', $this->mLanguage );
+ }
}
// Use loginend-https for HTTPS requests if it's not blank, loginend otherwise
* @author Bryan Tong Minh
* @author Michael Dale
*/
-
class UploadFromUrl extends UploadBase {
protected $mAsync, $mUrl;
protected $mIgnoreWarnings = true;
- protected $mTempPath;
+ protected $mTempPath, $mTmpHandle;
/**
* Checks if the user is allowed to use the upload-by-URL feature. If the
/**
* @param $request WebRequest object
+ * @return bool
*/
public static function isValidRequest( $request ) {
global $wgUser;
&& $wgUser->isAllowed( 'upload_by_url' );
}
+ /**
+ * @return string
+ */
public function getSourceType() { return 'url'; }
+ /**
+ * @return Status
+ */
public function fetchFile() {
if ( !Http::isValidURI( $this->mUrl ) ) {
return Status::newFatal( 'http-invalid-url' );
/**
* Download the file, save it to the temporary file and update the file
* size and set $mRemoveTempFile to true.
+ * @return Status
*/
protected function reallyFetchFile() {
if ( $this->mTempPath === false ) {