[svn r21547] FS#306 - Moving the checks for installed optional php-extensions to the main API.

skala
Ivan Tcholakov 16 years ago
parent 10cd541aab
commit 12aa14a32a
  1. 5
      main/inc/lib/main_api.lib.php
  2. 13
      main/inc/lib/multibyte_string_functions.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

@ -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)

Loading…
Cancel
Save