Jackmcbarn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/120156
Change subject: Remove limits on mw.language:formatDate()
......................................................................
Remove limits on mw.language:formatDate()
Remove the 6000 character per page limit of mw.language:formatDate(). It
only exists because ParserFunctions has something like it for performance
reasons. Since Lua has a maximum execution time, there's no reason that it
needs this as well.
Change-Id: I42ae4f51295135007c6e2edc66ec36b7d96e3be3
---
M engines/LuaCommon/LanguageLibrary.php
1 file changed, 0 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto
refs/changes/56/120156/1
diff --git a/engines/LuaCommon/LanguageLibrary.php
b/engines/LuaCommon/LanguageLibrary.php
index 1b99017..4faa2b2 100644
--- a/engines/LuaCommon/LanguageLibrary.php
+++ b/engines/LuaCommon/LanguageLibrary.php
@@ -2,11 +2,9 @@
class Scribunto_LuaLanguageLibrary extends Scribunto_LuaLibraryBase {
const MAX_LANG_CACHE_SIZE = 20;
- const MAX_TIME_CHARS = 6000;
var $langCache = array();
var $timeCache = array();
- var $timeChars = 0;
function register() {
// Pre-populate the language cache
@@ -261,11 +259,6 @@
if ( isset(
$this->timeCache[$format][$cacheKey][$langcode][$local] ) ) {
return array(
$this->timeCache[$format][$cacheKey][$langcode][$local] );
- }
-
- $this->timeChars += strlen( $format );
- if ( $this->timeChars > self::MAX_TIME_CHARS ) {
- throw new Scribunto_LuaError( "Too many calls to
mw.language:formatDate()" );
}
# Default input timezone is UTC.
--
To view, visit https://gerrit.wikimedia.org/r/120156
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42ae4f51295135007c6e2edc66ec36b7d96e3be3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits