From 80f7dc77d430774192b929d780f96260066df2ee Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 18 Oct 2015 09:31:31 +0200 Subject: Update to MediaWiki 1.25.3 --- includes/upload/UploadBase.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'includes/upload/UploadBase.php') 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' ); -- cgit v1.2.2