diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
commit | 80f7dc77d430774192b929d780f96260066df2ee (patch) | |
tree | 102eaae7fc9ec567f2af76e96da3de2d1e83afcf /includes/upload | |
parent | cccd7bb4d819334c07e0dadaf16cbfdef31880e1 (diff) |
Update to MediaWiki 1.25.3
Diffstat (limited to 'includes/upload')
-rw-r--r-- | includes/upload/UploadBase.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 6da8250b..9e113749 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -128,6 +128,16 @@ abstract class UploadBase { return true; } + /** + * Returns true if the user has surpassed the upload rate limit, false otherwise. + * + * @param User $user + * @return bool + */ + public static function isThrottled( $user ) { + return $user->pingLimiter( 'upload' ); + } + // Upload handlers. Should probably just be a global. private static $uploadHandlers = array( 'Stash', 'File', 'Url' ); |