diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index 7b5e9ccdea..b881ed7fc8 100644 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -169,6 +169,11 @@ define('DIR_HOTPOTATOES','/HotPotatoes_files'); // true whether the server runs on Windows OS, false otherwise. define ('IS_WINDOWS_OS', api_is_windows_os()); +// Checks for installed optional php-extensions. +define('INTL_INSTALLED', function_exists('intl_get_error_code')); // intl extension (from PECL), it is installed by default as of PHP 5.3.0 +define('ICONV_INSTALLED', function_exists('iconv')); // iconv extension, for PHP5 on Windows it is installed by default. +define('MBSTRING_INSTALLED', function_exists('mb_strlen')); // mbstring extension. + /* ============================================================================== MAIN API EXTENSIONS diff --git a/main/inc/lib/multibyte_string_functions.lib.php b/main/inc/lib/multibyte_string_functions.lib.php index af3159f831..11365cf910 100644 --- a/main/inc/lib/multibyte_string_functions.lib.php +++ b/main/inc/lib/multibyte_string_functions.lib.php @@ -37,18 +37,11 @@ * When encodings to be used are not supported by mbstring, this library * is able to exploit the PHP iconv extesion, which in this case should * be activated too. + * + * 5. For improved sorting of multibyte strings the library uses the intl + * php-extension if it is installed. */ -/** - * ---------------------------------------------------------------------------- - * Constants - * ---------------------------------------------------------------------------- - */ - -define('INTL_INSTALLED', function_exists('intl_get_error_code')); // intl extension (from PECL), it is installed by default as of PHP 5.3.0 -define('ICONV_INSTALLED', function_exists('iconv')); // iconv extension, for PHP5 on Windows it is installed by default. -define('MBSTRING_INSTALLED', function_exists('mb_strlen')); // mbstring extension. - /** * ---------------------------------------------------------------------------- * A safe way to calculate binary lenght of a string (as number of bytes)