2012-01-28 16:22:18 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Wikitext scripting infrastructure for MediaWiki.
|
|
|
|
* Copyright (C) 2009-2012 Victor Vasiliev <vasilvv@gmail.com>
|
|
|
|
* http://www.mediawiki.org/
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*/
|
|
|
|
|
2016-05-17 14:52:05 +00:00
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
2012-01-28 16:22:18 +00:00
|
|
|
die();
|
2016-05-17 14:52:05 +00:00
|
|
|
}
|
2012-01-28 16:22:18 +00:00
|
|
|
|
2012-04-06 05:04:30 +00:00
|
|
|
$wgExtensionCredits['parserhook']['Scribunto'] = array(
|
2012-01-28 16:22:18 +00:00
|
|
|
'path' => __FILE__,
|
2012-04-06 05:04:30 +00:00
|
|
|
'name' => 'Scribunto',
|
2015-05-24 19:43:25 +00:00
|
|
|
'author' => array( 'Victor Vasiliev', 'Tim Starling', 'Brad Jorsch' ),
|
2012-04-06 05:04:30 +00:00
|
|
|
'descriptionmsg' => 'scribunto-desc',
|
|
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:Scribunto',
|
2016-03-15 19:27:09 +00:00
|
|
|
'license-name' => 'GPL-2.0+ AND MIT',
|
2012-01-28 16:22:18 +00:00
|
|
|
);
|
|
|
|
|
2014-09-16 03:25:53 +00:00
|
|
|
define( 'CONTENT_MODEL_SCRIBUNTO', 'Scribunto' );
|
|
|
|
|
2014-03-28 20:46:41 +00:00
|
|
|
$wgMessagesDirs['Scribunto'] = __DIR__ . '/i18n';
|
2016-05-17 14:52:05 +00:00
|
|
|
$wgExtensionMessagesFiles['Scribunto'] = __DIR__ . '/Scribunto.i18n.php';
|
|
|
|
$wgExtensionMessagesFiles['ScribuntoMagic'] = __DIR__ . '/Scribunto.magic.php';
|
|
|
|
$wgExtensionMessagesFiles['ScribuntoNamespaces'] = __DIR__ . '/Scribunto.namespaces.php';
|
|
|
|
|
|
|
|
$wgAutoloadClasses['ScribuntoEngineBase'] = __DIR__ . '/common/Base.php';
|
|
|
|
$wgAutoloadClasses['ScribuntoModuleBase'] = __DIR__ . '/common/Base.php';
|
|
|
|
$wgAutoloadClasses['ScribuntoHooks'] = __DIR__ . '/common/Hooks.php';
|
|
|
|
$wgAutoloadClasses['ScribuntoException'] = __DIR__ . '/common/Common.php';
|
|
|
|
$wgAutoloadClasses['Scribunto'] = __DIR__ . '/common/Common.php';
|
|
|
|
$wgAutoloadClasses['ApiScribuntoConsole'] = __DIR__ . '/common/ApiScribuntoConsole.php';
|
|
|
|
$wgAutoloadClasses['ScribuntoContentHandler'] = __DIR__ . '/common/ScribuntoContentHandler.php';
|
|
|
|
$wgAutoloadClasses['ScribuntoContent'] = __DIR__ . '/common/ScribuntoContent.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaError'] = __DIR__ . '/engines/LuaCommon/LuaCommon.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaInterpreterNotFoundError'] =
|
|
|
|
__DIR__ . '/engines/LuaCommon/LuaInterpreter.php';
|
2016-10-13 15:07:44 +00:00
|
|
|
$wgAutoloadClasses['Scribunto_LuaInterpreterBadVersionError'] =
|
|
|
|
__DIR__ . '/engines/LuaCommon/LuaInterpreter.php';
|
2016-05-17 14:52:05 +00:00
|
|
|
$wgAutoloadClasses['Scribunto_LuaSandboxInterpreter'] = __DIR__ . '/engines/LuaSandbox/Engine.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaSandboxCallback'] = __DIR__ . '/engines/LuaSandbox/Engine.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaStandaloneInterpreterFunction'] =
|
|
|
|
__DIR__ . '/engines/LuaStandalone/LuaStandaloneEngine.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaEngineTestSkip'] =
|
|
|
|
__DIR__ . '/tests/engines/LuaCommon/LuaEngineTestBase.php';
|
2012-04-06 05:04:30 +00:00
|
|
|
|
2013-03-20 16:30:26 +00:00
|
|
|
$wgHooks['SoftwareInfo'][] = 'ScribuntoHooks::getSoftwareInfo';
|
|
|
|
|
2012-04-06 05:04:30 +00:00
|
|
|
$wgHooks['ParserFirstCallInit'][] = 'ScribuntoHooks::setupParserHook';
|
2013-03-14 12:42:42 +00:00
|
|
|
$wgHooks['ParserLimitReport']['scribunto'] = 'ScribuntoHooks::reportLimits';
|
|
|
|
$wgHooks['ParserLimitReportPrepare'][] = 'ScribuntoHooks::reportLimitData';
|
|
|
|
$wgHooks['ParserLimitReportFormat'][] = 'ScribuntoHooks::formatLimitData';
|
2012-04-06 05:04:30 +00:00
|
|
|
$wgHooks['ParserClearState'][] = 'ScribuntoHooks::clearState';
|
2012-11-15 00:13:19 +00:00
|
|
|
$wgHooks['ParserCloned'][] = 'ScribuntoHooks::parserCloned';
|
2012-04-06 05:04:30 +00:00
|
|
|
|
|
|
|
$wgHooks['CanonicalNamespaces'][] = 'ScribuntoHooks::addCanonicalNamespaces';
|
|
|
|
$wgHooks['CodeEditorGetPageLanguage'][] = 'ScribuntoHooks::getCodeLanguage';
|
2012-07-03 02:56:55 +00:00
|
|
|
$wgHooks['EditPageBeforeEditChecks'][] = 'ScribuntoHooks::beforeEditChecks';
|
2015-03-27 16:32:19 +00:00
|
|
|
$wgHooks['EditPage::showReadOnlyForm:initial'][] = 'ScribuntoHooks::showReadOnlyFormInitial';
|
2012-07-14 04:23:42 +00:00
|
|
|
$wgHooks['EditPageBeforeEditButtons'][] = 'ScribuntoHooks::beforeEditButtons';
|
2016-10-13 18:39:33 +00:00
|
|
|
$wgHooks['EditFilterMergedContent'][] = 'ScribuntoHooks::validateScript';
|
2013-03-08 17:01:50 +00:00
|
|
|
$wgHooks['ArticleViewHeader'][] = 'ScribuntoHooks::showDocPageHeader';
|
2013-02-20 22:00:42 +00:00
|
|
|
$wgHooks['ContentHandlerDefaultModelFor'][] = 'ScribuntoHooks::contentHandlerDefaultModelFor';
|
2012-01-28 16:22:18 +00:00
|
|
|
|
Added tests and fixed bugs
* Added unit tests for the two Lua interpreter classes
* Fixed a bug in checkType()
* Have Scribunto_LuaSandboxInterpreter throw an exception on construct
when the extension doesn't exist, to match the standalone behaviour.
* In Scribunto_LuaSandboxInterpreter, removed debugging statements
accidentally left in.
* Convert LuaSandboxTimeoutError to the appropriate common error
message.
* Moved the option munging from the sandbox engine to the interpreter,
so that the interpreter can be unit tested separately.
* Use /bin/sh instead of bash for lua_ulimit.sh, since dash is smaller
and still supports ulimit.
* Use exec to run the lua binary, so that the vsize of the shell doesn't
add to the memory limit.
* Added a quit function to the standalone interpreter. Unused at present.
* Don't add a comma after the last element of a table in a Lua
expression.
* Make the SIGXCPU detection work: proc_open() runs the command via a
shell, which reports signals in the child via the exit status, so
proc_get_status() will never return a valid termsig element.
* In MWServer:call(), fixed a bug causing the return values to be
wrapped in an array.
* Fixed a misunderstanding of what select() does.
* In MWServer:getStatus(), fixed indexes so that vsize will be correct.
Removed RSS, since it wasn't used anyway and turns out to be measured
in multiples of the page size, and I couldn't be bothered trying to
fetch that from getconf. Return the PID and vsize as numbers rather
than strings.
* Added a simple table dump feature to MWServer:debug().
* Fixed brackets in MWServer:tostring().
* Added missing Linux 32-bit binary.
Change-Id: Ibf5f4656b1c0a9f81287d363184c3fe9d2abdafd
2012-04-16 04:41:08 +00:00
|
|
|
$wgHooks['UnitTestsList'][] = 'ScribuntoHooks::unitTestsList';
|
2016-05-17 14:52:05 +00:00
|
|
|
$wgParserTestFiles[] = __DIR__ . '/tests/engines/LuaCommon/luaParserTests.txt';
|
Added tests and fixed bugs
* Added unit tests for the two Lua interpreter classes
* Fixed a bug in checkType()
* Have Scribunto_LuaSandboxInterpreter throw an exception on construct
when the extension doesn't exist, to match the standalone behaviour.
* In Scribunto_LuaSandboxInterpreter, removed debugging statements
accidentally left in.
* Convert LuaSandboxTimeoutError to the appropriate common error
message.
* Moved the option munging from the sandbox engine to the interpreter,
so that the interpreter can be unit tested separately.
* Use /bin/sh instead of bash for lua_ulimit.sh, since dash is smaller
and still supports ulimit.
* Use exec to run the lua binary, so that the vsize of the shell doesn't
add to the memory limit.
* Added a quit function to the standalone interpreter. Unused at present.
* Don't add a comma after the last element of a table in a Lua
expression.
* Make the SIGXCPU detection work: proc_open() runs the command via a
shell, which reports signals in the child via the exit status, so
proc_get_status() will never return a valid termsig element.
* In MWServer:call(), fixed a bug causing the return values to be
wrapped in an array.
* Fixed a misunderstanding of what select() does.
* In MWServer:getStatus(), fixed indexes so that vsize will be correct.
Removed RSS, since it wasn't used anyway and turns out to be measured
in multiples of the page size, and I couldn't be bothered trying to
fetch that from getconf. Return the PID and vsize as numbers rather
than strings.
* Added a simple table dump feature to MWServer:debug().
* Fixed brackets in MWServer:tostring().
* Added missing Linux 32-bit binary.
Change-Id: Ibf5f4656b1c0a9f81287d363184c3fe9d2abdafd
2012-04-16 04:41:08 +00:00
|
|
|
|
2014-09-16 03:25:53 +00:00
|
|
|
$wgContentHandlers[CONTENT_MODEL_SCRIBUNTO] = 'ScribuntoContentHandler';
|
2012-04-23 11:36:13 +00:00
|
|
|
|
2012-07-14 04:23:42 +00:00
|
|
|
$sbtpl = array(
|
2016-05-17 14:52:05 +00:00
|
|
|
'localBasePath' => __DIR__ . '/modules',
|
2012-04-23 11:36:13 +00:00
|
|
|
'remoteExtPath' => 'Scribunto/modules',
|
2012-07-14 04:23:42 +00:00
|
|
|
);
|
|
|
|
|
2015-01-23 21:36:55 +00:00
|
|
|
$wgResourceModules['ext.scribunto.errors'] = $sbtpl + array(
|
|
|
|
'scripts' => 'ext.scribunto.errors.js',
|
|
|
|
'styles' => 'ext.scribunto.errors.css',
|
2012-04-23 11:36:13 +00:00
|
|
|
'dependencies' => array( 'jquery.ui.dialog' ),
|
|
|
|
'messages' => array(
|
|
|
|
'scribunto-parser-dialog-title'
|
|
|
|
),
|
|
|
|
);
|
2015-01-23 21:36:55 +00:00
|
|
|
$wgResourceModules['ext.scribunto.logs'] = $sbtpl + array(
|
|
|
|
'styles' => 'ext.scribunto.logs.css',
|
|
|
|
'position' => 'top',
|
|
|
|
);
|
2012-07-14 04:23:42 +00:00
|
|
|
$wgResourceModules['ext.scribunto.edit'] = $sbtpl + array(
|
|
|
|
'scripts' => 'ext.scribunto.edit.js',
|
|
|
|
'styles' => 'ext.scribunto.edit.css',
|
2015-01-23 21:36:55 +00:00
|
|
|
'dependencies' => array( 'mediawiki.api', 'jquery.spinner' ),
|
2012-07-14 04:23:42 +00:00
|
|
|
'messages' => array(
|
|
|
|
'scribunto-console-title',
|
|
|
|
'scribunto-console-intro',
|
|
|
|
'scribunto-console-clear',
|
|
|
|
'scribunto-console-cleared',
|
2013-02-08 22:32:28 +00:00
|
|
|
'scribunto-console-cleared-session-lost',
|
2012-07-14 04:23:42 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
$wgAPIModules['scribunto-console'] = 'ApiScribuntoConsole';
|
2012-04-23 11:36:13 +00:00
|
|
|
|
2012-01-28 16:22:18 +00:00
|
|
|
/***** Individual engines and their configurations *****/
|
|
|
|
|
2016-05-17 14:52:05 +00:00
|
|
|
$wgAutoloadClasses['Scribunto_LuaEngine'] = __DIR__ . '/engines/LuaCommon/LuaCommon.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaModule'] = __DIR__ . '/engines/LuaCommon/LuaCommon.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaInterpreter'] = __DIR__ . '/engines/LuaCommon/LuaInterpreter.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaSandboxEngine'] = __DIR__ . '/engines/LuaSandbox/Engine.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaStandaloneEngine'] =
|
|
|
|
__DIR__ . '/engines/LuaStandalone/LuaStandaloneEngine.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaStandaloneInterpreter'] =
|
|
|
|
__DIR__ . '/engines/LuaStandalone/LuaStandaloneEngine.php';
|
2012-04-13 10:38:12 +00:00
|
|
|
|
2013-01-25 17:53:18 +00:00
|
|
|
/***** Individual libraries and their configurations *****/
|
2016-05-17 14:52:05 +00:00
|
|
|
$wgAutoloadClasses['Scribunto_LuaLibraryBase'] = __DIR__ . '/engines/LuaCommon/LibraryBase.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaEngineTestBase'] =
|
|
|
|
__DIR__ . '/tests/engines/LuaCommon/LuaEngineTestBase.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaDataProvider'] =
|
|
|
|
__DIR__ . '/tests/engines/LuaCommon/LuaDataProvider.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaSiteLibrary'] = __DIR__ . '/engines/LuaCommon/SiteLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaUriLibrary'] = __DIR__ . '/engines/LuaCommon/UriLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaUstringLibrary'] =
|
|
|
|
__DIR__ . '/engines/LuaCommon/UstringLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaLanguageLibrary'] =
|
|
|
|
__DIR__ . '/engines/LuaCommon/LanguageLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaMessageLibrary'] =
|
|
|
|
__DIR__ . '/engines/LuaCommon/MessageLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaTitleLibrary'] = __DIR__ . '/engines/LuaCommon/TitleLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaTextLibrary'] = __DIR__ . '/engines/LuaCommon/TextLibrary.php';
|
|
|
|
$wgAutoloadClasses['Scribunto_LuaHtmlLibrary'] = __DIR__ . '/engines/LuaCommon/HtmlLibrary.php';
|
2016-08-15 22:14:29 +00:00
|
|
|
$wgAutoloadClasses['Scribunto_LuaHashLibrary'] = __DIR__ . '/engines/LuaCommon/HashLibrary.php';
|
2012-01-28 16:22:18 +00:00
|
|
|
|
|
|
|
/***** Configuration *****/
|
|
|
|
|
|
|
|
/**
|
2012-04-06 05:04:30 +00:00
|
|
|
* The name of the default script engine.
|
2012-01-28 16:22:18 +00:00
|
|
|
*/
|
Added more Lua environment features
Package library:
* Added a simulation of the Lua 5.1 package library.
* Removed mw.import(), replaced it with a package loader. Packages can be
retrieved from the wiki, using require('Module:Foo'), or from files
distributed with Scribunto, using require('foo'). The "Module:" prefix allows
for source compatibility with existing Lua code.
* Added a couple of libraries from LuaForge: luabit and stringtools.
* Made fetchModuleFromParser() return null on error instead of throwing an
exception, to more easily support the desired behaviour of the package loader,
which needs to return null on error.
* Renamed mw.setupEnvironment() to mw.setup() since it is setting up things
other than the environment now.
* In MWServer:handleRegisterLibrary(), remove the feature which interprets dots
in library names, since LuaSandbox doesn't support this.
Improved module isolation and related refactoring:
* Expose restricted versions of getfenv() and setfenv() to user Lua code.
Requires luasandbox r114952.
* Don't cache the export list returned by module execution for later function
calls. This breaks isolation of #invoke calls, since the local variables are
persistent.
* Removed ScribuntoFunctionBase and its children, since it doesn't really have
a purpose if it can't cache anything. Instead, invoke functions using a module
method called invoke().
* Removed Module::initialize(), replaced it with a validate() function. This is
a more elegant interface and works better with the new module caching scheme.
* Use a Status object for the return value of Engine::validate() instead of an
array. Use the formatting facilities of the Status class.
Other:
* Removed "too many returns" error, doesn't fit in with Lua conventions.
* Use the standalone engine by default, so that the extension will work without
configuration for more people.
* Added an accessor for $engine->interpreter
* Fix mw.clone() to correctly clone metatables
* If the standalone interpreter exits due to an error, there are some contexts
where the initial error will be caught and ignored, and the user will see the
error from checkValid() instead. In this case, rethrow the original error for
a more informative message.
* Load mw.lua into the initial standalone environment, to reduce code
duplication between mw.lua and MWServer.lua.
* Fixed a bug in Scribunto_LuaStandaloneInterpreter::handleCall() for functions
that return no results.
* Fixed a bug in encodeLuaVar() for strings with "\r". Added test case.
* In MWServer.lua, don't call error() for internal errors, instead just print
the error and exit. This avoids a protocol violation when an error is
encountered from within handleCall().
* Added lots of documentation. Lua doc comments are in LuaDoc format.
Change-Id: Ie2fd572c362bedf02f45d3fa5352a5280e034740
2012-04-18 03:46:18 +00:00
|
|
|
$wgScribuntoDefaultEngine = 'luastandalone';
|
2012-01-28 16:22:18 +00:00
|
|
|
|
2012-04-05 07:58:02 +00:00
|
|
|
/**
|
2012-04-06 05:04:30 +00:00
|
|
|
* Configuration for each script engine
|
2012-04-05 07:58:02 +00:00
|
|
|
*/
|
2012-04-06 05:04:30 +00:00
|
|
|
$wgScribuntoEngineConf = array(
|
2012-04-05 07:58:02 +00:00
|
|
|
'luasandbox' => array(
|
2012-04-13 10:38:12 +00:00
|
|
|
'class' => 'Scribunto_LuaSandboxEngine',
|
|
|
|
'memoryLimit' => 50 * 1024 * 1024,
|
|
|
|
'cpuLimit' => 7,
|
2012-05-23 06:51:59 +00:00
|
|
|
|
2012-12-27 23:26:06 +00:00
|
|
|
// The profiler sample period, or false to disable the profiler
|
|
|
|
'profilerPeriod' => 0.02,
|
|
|
|
|
2012-09-25 07:58:42 +00:00
|
|
|
// Set this to true to allow setfenv() and getfenv() in user code.
|
2014-03-28 20:46:41 +00:00
|
|
|
// Note that these functions have been removed in Lua 5.2. Scribunto
|
|
|
|
// does not yet support Lua 5.2, but we expect support will be
|
|
|
|
// implemented in the future, and there is no guarantee that a
|
2012-05-23 06:51:59 +00:00
|
|
|
// simulation of setfenv() and getfenv() will be provided.
|
|
|
|
'allowEnvFuncs' => false,
|
2012-04-13 10:38:12 +00:00
|
|
|
),
|
|
|
|
'luastandalone' => array(
|
|
|
|
'class' => 'Scribunto_LuaStandaloneEngine',
|
|
|
|
|
|
|
|
// A filename to act as the destination for stderr from the Lua
|
2014-03-28 20:46:41 +00:00
|
|
|
// binary. This may provide useful error information if Lua fails to
|
2012-04-13 10:38:12 +00:00
|
|
|
// run. Set this to null to discard stderr output.
|
|
|
|
'errorFile' => null,
|
|
|
|
|
|
|
|
// The location of the Lua binary, or null to use the bundled binary.
|
|
|
|
'luaPath' => null,
|
2012-04-05 07:58:02 +00:00
|
|
|
'memoryLimit' => 50 * 1024 * 1024,
|
|
|
|
'cpuLimit' => 7,
|
2012-05-23 06:51:59 +00:00
|
|
|
'allowEnvFuncs' => false,
|
2012-04-05 07:58:02 +00:00
|
|
|
),
|
|
|
|
);
|
2012-01-28 16:22:18 +00:00
|
|
|
|
|
|
|
/**
|
2012-05-22 03:56:07 +00:00
|
|
|
* Set to true to enable the SyntaxHighlight_GeSHi extension
|
2012-01-28 16:22:18 +00:00
|
|
|
*/
|
2012-04-06 05:04:30 +00:00
|
|
|
$wgScribuntoUseGeSHi = false;
|
2012-01-28 16:22:18 +00:00
|
|
|
|
2012-02-06 22:14:47 +00:00
|
|
|
/**
|
2012-05-22 03:56:07 +00:00
|
|
|
* Set to true to enable the CodeEditor extension
|
2012-02-06 22:14:47 +00:00
|
|
|
*/
|
2012-04-06 05:04:30 +00:00
|
|
|
$wgScribuntoUseCodeEditor = false;
|
2012-02-06 22:14:47 +00:00
|
|
|
|
2015-10-24 23:54:11 +00:00
|
|
|
/**
|
|
|
|
* Set to true to enable gathering and reporting of performance data
|
|
|
|
* for slow function invocations.
|
|
|
|
*/
|
|
|
|
$wgScribuntoGatherFunctionStats = false;
|
|
|
|
|
2015-10-29 22:53:10 +00:00
|
|
|
/**
|
|
|
|
* If $wgScribuntoGatherFunctionStats is true, this variable specifies
|
|
|
|
* the percentile threshold for slow function invocations. Should be
|
|
|
|
* a value between 0 and 1 (exclusive).
|
|
|
|
*/
|
|
|
|
$wgScribuntoSlowFunctionThreshold = 0.90;
|
|
|
|
|
2012-08-15 00:57:30 +00:00
|
|
|
define( 'NS_MODULE', 828 );
|
|
|
|
define( 'NS_MODULE_TALK', 829 );
|
2013-02-21 02:53:47 +00:00
|
|
|
|
|
|
|
// Set subpages by default
|
|
|
|
$wgNamespacesWithSubpages[NS_MODULE] = true;
|
|
|
|
$wgNamespacesWithSubpages[NS_MODULE_TALK] = true;
|
2014-03-31 00:28:21 +00:00
|
|
|
|
|
|
|
$wgTrackingCategories[] = 'scribunto-common-error-category';
|
|
|
|
$wgTrackingCategories[] = 'scribunto-module-with-errors-category';
|