mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 10:31:07 +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() { | ||||
| 	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'); | ||||
|  | ||||
| @ -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")) { | ||||
|  | ||||
| @ -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(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user