mirror of
https://github.com/Mibew/design.git
synced 2025-01-23 02:20:34 +03:00
list of loaded extensions (updates), check that mysql extension is loaded, fix warnings in button code
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@586 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
cfaf7ff501
commit
b186d0c2b6
@ -307,6 +307,9 @@ function getgetparam($name,$default='') {
|
|||||||
|
|
||||||
function connect() {
|
function connect() {
|
||||||
global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding, $force_charset_in_connection;
|
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 )
|
$link = @mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass )
|
||||||
or die('Could not connect: ' . mysql_error());
|
or die('Could not connect: ' . mysql_error());
|
||||||
mysql_select_db($mysqldb,$link) or die('Could not select database');
|
mysql_select_db($mysqldb,$link) or die('Could not select database');
|
||||||
|
@ -23,7 +23,7 @@ $imageLocales = array();
|
|||||||
$allLocales = get_available_locales();
|
$allLocales = get_available_locales();
|
||||||
foreach($allLocales as $curr) {
|
foreach($allLocales as $curr) {
|
||||||
$imagesDir = "../locales/$curr/button";
|
$imagesDir = "../locales/$curr/button";
|
||||||
if($handle = opendir($imagesDir)) {
|
if($handle = @opendir($imagesDir)) {
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if (preg_match("/^(\w+)_on.gif$/", $file, $matches)
|
if (preg_match("/^(\w+)_on.gif$/", $file, $matches)
|
||||||
&& is_file("$imagesDir/".$matches[1]."_off.gif")) {
|
&& is_file("$imagesDir/".$matches[1]."_off.gif")) {
|
||||||
|
@ -18,6 +18,8 @@ require_once('../libs/settings.php');
|
|||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
|
||||||
|
$default_extensions = array('mysql', 'gd');
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
$page = array(
|
$page = array(
|
||||||
'localizations' => get_available_locales(),
|
'localizations' => get_available_locales(),
|
||||||
@ -25,6 +27,15 @@ $page = array(
|
|||||||
'version' => $version,
|
'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);
|
prepare_menu($operator);
|
||||||
setup_settings_tabs(3);
|
setup_settings_tabs(3);
|
||||||
start_html_output();
|
start_html_output();
|
||||||
|
Loading…
Reference in New Issue
Block a user