Merge "Allow message object on HTMLForm::setWrapperLegendMsg/setSubmitTextMsg"
[lhc/web/wiklou.git] / thumb.php
index 9a4b332..d53c10c 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -388,7 +388,8 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath
        $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
+       // 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 {
@@ -520,7 +521,8 @@ function wfExtractThumbRequestInfo( $thumbRel ) {
        $repo = RepoGroup::singleton()->getLocalRepo();
 
        $hashDirReg = $subdirReg = '';
-       for ( $i = 0; $i < $repo->getHashLevels(); $i++ ) {
+       $hashLevels = $repo->getHashLevels();
+       for ( $i = 0; $i < $hashLevels; $i++ ) {
                $subdirReg .= '[0-9a-f]';
                $hashDirReg .= "$subdirReg/";
        }