From: Max Semenik Date: Fri, 20 Jul 2018 06:54:49 +0000 (-0700) Subject: GlobalFunctions: use a closure instead of polluting global namespace X-Git-Tag: 1.34.0-rc.0~4695 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=b8dee03d9e6337031e5f118d46183a3a63e77b0c;p=lhc%2Fweb%2Fwiklou.git GlobalFunctions: use a closure instead of polluting global namespace Change-Id: Ia587008de75a8bde90ad45d4932284f0b6401845 --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index afad5c468b..eec4216468 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -866,20 +866,13 @@ function wfParseUrl( $url ) { function wfExpandIRI( $url ) { return preg_replace_callback( '/((?:%[89A-F][0-9A-F])+)/i', - 'wfExpandIRI_callback', + function ( array $matches ) { + return urldecode( $matches[1] ); + }, wfExpandUrl( $url ) ); } -/** - * Private callback for wfExpandIRI - * @param array $matches - * @return string - */ -function wfExpandIRI_callback( $matches ) { - return urldecode( $matches[1] ); -} - /** * Make URL indexes, appropriate for the el_index field of externallinks. *