| | |
| | | |
| | | /** |
| | | * Private constructor |
| | | * |
| | | * @todo Remove global $CONFIG |
| | | */ |
| | | private function __construct() |
| | | { |
| | | // load configuration |
| | | $this->config = new rcube_config(); |
| | | $GLOBALS['CONFIG'] = $this->config->all(); |
| | | |
| | | register_shutdown_function(array($this, 'shutdown')); |
| | | } |
| | |
| | | @include(INSTALL_PATH . 'program/localization/en_US/messages.inc'); |
| | | |
| | | if (is_array($labels)) |
| | | $sa_text_data = $labels; |
| | | $this->texts = $labels; |
| | | if (is_array($messages)) |
| | | $sa_text_data = array_merge($sa_text_data, $messages); |
| | | $this->texts = array_merge($this->texts, $messages); |
| | | |
| | | // include user language files |
| | | if ($lang != 'en' && is_dir(INSTALL_PATH . 'program/localization/' . $lang)) { |
| | |
| | | * @param string Password to encrypt |
| | | * @return string Encryprted string |
| | | */ |
| | | private function encrypt_passwd($pass) |
| | | public function encrypt_passwd($pass) |
| | | { |
| | | if (function_exists('mcrypt_module_open') && ($td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""))) { |
| | | $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); |