summaryrefslogtreecommitdiff
path: root/extensions/ParserFunctions/Expr.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /extensions/ParserFunctions/Expr.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'extensions/ParserFunctions/Expr.php')
-rw-r--r--extensions/ParserFunctions/Expr.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/ParserFunctions/Expr.php b/extensions/ParserFunctions/Expr.php
index ee646021..8597f1f7 100644
--- a/extensions/ParserFunctions/Expr.php
+++ b/extensions/ParserFunctions/Expr.php
@@ -47,8 +47,13 @@ define( 'EXPR_POW', 35 );
define( 'EXPR_PI', 36 );
class ExprError extends MWException {
+ /**
+ * @param $msg string
+ * @param $parameter string
+ */
public function __construct( $msg, $parameter = '' ) {
- $this->message = '<strong class="error">' . wfMsgForContent( "pfunc_expr_$msg", htmlspecialchars( $parameter ) ) . '</strong>';
+ $msg = wfMessage( "pfunc_expr_$msg", $parameter )->inContentLanguage()->escaped();
+ $this->message = '<strong class="error">' . $msg . '</strong>';
}
}
@@ -158,6 +163,7 @@ class ExprParser {
* http://montcs.bloomu.edu/~bobmon/Information/RPN/infix2rpn.shtml
* It's essentially the same as Dijkstra's shunting yard algorithm.
* @param $expr string
+ * @throws ExprError
* @return string
*/
function doExpression( $expr ) {