From: jenkins-bot Date: Wed, 6 Feb 2013 19:35:36 +0000 (+0000) Subject: Merge "(bug 43801) add a getter for ICU version to ICUCollation" X-Git-Tag: 1.31.0-rc.0~20784 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=f8daed077a379161ac5d32c9c503f57028b4ccc7;p=lhc%2Fweb%2Fwiklou.git Merge "(bug 43801) add a getter for ICU version to ICUCollation" --- f8daed077a379161ac5d32c9c503f57028b4ccc7 diff --cc includes/Collation.php index 7c2c05ed0a,63cfbe18fb..7879ebecdc --- a/includes/Collation.php +++ b/includes/Collation.php @@@ -392,4 -374,21 +392,20 @@@ class IcuCollation extends Collation } return false; } + + /** + * Return the version of ICU library used by PHP's intl extension, + * or false when the extension is not installed of the version + * can't be determined. + * + * The constant INTL_ICU_VERSION this function refers to isn't really + * documented. It is available since PHP 5.3.7 (see PHP bug 54561). + * This function will return false on older PHPs. + * + * @since 1.21 + * @return string|false + */ + static function getICUVersion() { + return defined( 'INTL_ICU_VERSION' ) ? INTL_ICU_VERSION : false; + } } -