diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 438ddfc9..ef96a855 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -307,6 +307,9 @@ function getgetparam($name,$default='') { function connect() { global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding, $force_charset_in_connection; + if(!extension_loaded("mysql")) { + die('Mysql extension is not loaded'); + } $link = @mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) or die('Could not connect: ' . mysql_error()); mysql_select_db($mysqldb,$link) or die('Could not select database'); diff --git a/src/messenger/webim/operator/getcode.php b/src/messenger/webim/operator/getcode.php index a9afc630..c5639457 100644 --- a/src/messenger/webim/operator/getcode.php +++ b/src/messenger/webim/operator/getcode.php @@ -23,7 +23,7 @@ $imageLocales = array(); $allLocales = get_available_locales(); foreach($allLocales as $curr) { $imagesDir = "../locales/$curr/button"; - if($handle = opendir($imagesDir)) { + if($handle = @opendir($imagesDir)) { while (false !== ($file = readdir($handle))) { if (preg_match("/^(\w+)_on.gif$/", $file, $matches) && is_file("$imagesDir/".$matches[1]."_off.gif")) { diff --git a/src/messenger/webim/operator/updates.php b/src/messenger/webim/operator/updates.php index 5100557f..66838c72 100644 --- a/src/messenger/webim/operator/updates.php +++ b/src/messenger/webim/operator/updates.php @@ -18,6 +18,8 @@ require_once('../libs/settings.php'); $operator = check_login(); +$default_extensions = array('mysql', 'gd'); + $errors = array(); $page = array( 'localizations' => get_available_locales(), @@ -25,6 +27,15 @@ $page = array( 'version' => $version, ); +foreach($default_extensions as $ext) { + if(!extension_loaded($ext)) { + $page['phpVersion'] .= " $ext/absent"; + } else { + $ver = phpversion($ext); + $page['phpVersion'] .= $ver ? " $ext/$ver" : " $ext"; + } +} + prepare_menu($operator); setup_settings_tabs(3); start_html_output();