summaryrefslogtreecommitdiff
path: root/extensions/ParserFunctions/ParserFunctions.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ParserFunctions/ParserFunctions.php')
-rw-r--r--extensions/ParserFunctions/ParserFunctions.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/extensions/ParserFunctions/ParserFunctions.php b/extensions/ParserFunctions/ParserFunctions.php
index ef2ad8d3..4ef62047 100644
--- a/extensions/ParserFunctions/ParserFunctions.php
+++ b/extensions/ParserFunctions/ParserFunctions.php
@@ -33,7 +33,7 @@ $wgPFEnableStringFunctions = false;
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'ParserFunctions',
- 'version' => '1.4.1',
+ 'version' => '1.5.1',
'url' => 'https://www.mediawiki.org/wiki/Extension:ParserFunctions',
'author' => array( 'Tim Starling', 'Robert Rohde', 'Ross McClure', 'Juraj Simlovic' ),
'descriptionmsg' => 'pfunc_desc',
@@ -41,6 +41,7 @@ $wgExtensionCredits['parserhook'][] = array(
$wgAutoloadClasses['ExtParserFunctions'] = dirname( __FILE__ ) . '/ParserFunctions_body.php';
$wgAutoloadClasses['ExprParser'] = dirname( __FILE__ ) . '/Expr.php';
+$wgAutoloadClasses['ExprError'] = dirname( __FILE__ ) . '/Expr.php';
$wgExtensionMessagesFiles['ParserFunctions'] = dirname( __FILE__ ) . '/ParserFunctions.i18n.php';
$wgExtensionMessagesFiles['ParserFunctionsMagic'] = dirname( __FILE__ ) . '/ParserFunctions.i18n.magic.php';
@@ -85,3 +86,14 @@ function wfRegisterParserFunctions( $parser ) {
return true;
}
+
+$wgHooks['UnitTestsList'][] = 'wfParserFunctionsTests';
+
+/**
+ * @param $files array
+ * @return bool
+ */
+function wfParserFunctionsTests( &$files ) {
+ $files[] = dirname( __FILE__ ) . '/tests/ExpressionTest.php';
+ return true;
+}