Project

General

Profile

« Previous | Next » 

Revision 452

Added by Matthias over 17 years ago

again copied all changes for WB 2.6.6 from trunk to branches

View differences:

details.php
55 55
	$module = $result->fetchRow();
56 56
}
57 57

  
58
// Get language description if available
59
// First get users defined language
60
$query = "SELECT language FROM ".TABLE_PREFIX."users WHERE user_id = '".$admin->get_user_id()."'";
61
$results = $database->query($query);
62
if($results->numRows() > 0) {
63
	// We found a language for the user, store it
64
	$user_info=$results->fetchRow();
65
	$user_language = $user_info['language'];
66

  
67
	// Next check for language file in module dir and insert the variables from that file
68
	if(file_exists(WB_PATH.'/modules/'.$file.'/languages/'.$user_language.'.php')) {
69
		require(WB_PATH.'/modules/'.$file.'/languages/'.$user_language.'.php');
70
		
71
		// Check to see if new variable exists... -> $module_description
72
		if (isset($module_description)) {
73
			// Override the module-description with correct desription in users language
74
			$module['description']=$module_description;
75
		}	
76
	}
77
}
78

  
58 79
$template->set_var(array(
59 80
								'NAME' => $module['name'],
60 81
								'AUTHOR' => $module['author'],

Also available in: Unified diff