From: Translation updater bot Date: Fri, 27 Jun 2014 20:31:32 +0000 (+0000) Subject: Merge "Localisation updates from https://translatewiki.net." X-Git-Tag: 1.31.0-rc.0~15194 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=801d505aa1db5660e0b0d328550cd6bb6340911c;hp=a4e23cb374fe653ee86f5b45869483fa1883acef;p=lhc%2Fweb%2Fwiklou.git Merge "Localisation updates from https://translatewiki.net." --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 8d7e654ac2..82b418825c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1496,7 +1496,7 @@ $result: Change this value to override the result of wfIsTrustedProxy() $url: URL used to upload from &$allowed: Boolean indicating if uploading is allowed for given URL -'isValidEmailAddr': Override the result of User::isValidEmailAddr(), for +'isValidEmailAddr': Override the result of Sanitizer::validateEmail(), for instance to return false if the domain name doesn't match your organization. $addr: The e-mail address entered by the user &$result: Set this and return false to override the internal checks diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index 0ef41fa268..f444469a6f 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -49,13 +49,13 @@ class OracleUpdater extends DatabaseUpdater { array( 'doRemoveNotNullEmptyDefaults' ), array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ), - //1.18 + // 1.18 array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ), array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ), array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), array( 'doRecentchangesFK2Cascade' ), - //1.19 + // 1.19 array( 'addIndex', 'logging', 'i05', 'patch-logging_type_action_index.sql' ), array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1_field.sql' ), array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1_field.sql' ), @@ -66,12 +66,12 @@ class OracleUpdater extends DatabaseUpdater { array( 'addIndex', 'job', 'i02', 'patch-job_timestamp_index.sql' ), array( 'doPageRestrictionsPKUKFix' ), - //1.20 + // 1.20 array( 'addIndex', 'ipblocks', 'i05', 'patch-ipblocks_i05_index.sql' ), array( 'addIndex', 'revision', 'i05', 'patch-revision_i05_index.sql' ), array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ), - //1.21 + // 1.21 array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ), array( 'addField', 'revision', 'rev_content_model', @@ -93,14 +93,14 @@ class OracleUpdater extends DatabaseUpdater { array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase-255.sql' ), - //1.23 + // 1.23 array( 'addIndex', 'logging', 'i06', 'patch-logging_user_text_type_time_index.sql' ), array( 'addIndex', 'logging', 'i07', 'patch-logging_user_text_time_index.sql' ), array( 'addField', 'user', 'user_password_expires', 'patch-user_password_expire.sql' ), array( 'addField', 'page', 'page_links_updated', 'patch-page_links_updated.sql' ), array( 'addField', 'recentchanges', 'rc_source', 'patch-rc_source.sql' ), - //1.24 + // 1.24 // KEEP THIS AT THE BOTTOM!! array( 'doRebuildDuplicateFunction' ), diff --git a/thumb.php b/thumb.php index d7bf453382..c611dc3ca7 100644 --- a/thumb.php +++ b/thumb.php @@ -387,9 +387,17 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath $thumb = false; $errorHtml = false; + // guard thumbnail rendering with PoolCounter to avoid stampedes + // expensive files use a separate PoolCounter config so it is possible to set up a global limit on them + if ( $file->isExpensiveToThumbnail() ) { + $poolCounterType = 'FileRenderExpensive'; + } else { + $poolCounterType = 'FileRender'; + } + // Thumbnail isn't already there, so create the new thumbnail... try { - $work = new PoolCounterWorkViaCallback( 'FileRender', sha1( $file->getName() ), + $work = new PoolCounterWorkViaCallback( $poolCounterType, sha1( $file->getName() ), array( 'doWork' => function() use ( $file, $params ) { return $file->transform( $params, File::RENDER_NOW );