Revision 718
Added by thorn almost 17 years ago
index.php | ||
---|---|---|
27 | 27 |
require_once(WB_PATH.'/framework/class.admin.php'); |
28 | 28 |
$admin = new admin('Preferences'); |
29 | 29 |
|
30 |
require_once(WB_PATH.'/framework/functions-utf8.php'); |
|
31 |
|
|
30 | 32 |
// Create new template object for the preferences form |
31 | 33 |
$template = new Template(ADMIN_PATH.'/preferences'); |
32 | 34 |
$template->set_file('page', 'template.html'); |
... | ... | |
50 | 52 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by name"); |
51 | 53 |
if($result->numRows() > 0) { |
52 | 54 |
while($addon = $result->fetchRow()) { |
55 |
$l_codes[$addon['name']] = $addon['directory']; |
|
56 |
$l_names[$addon['name']] = entities_to_7bit($addon['name']); // sorting-problem workaround |
|
57 |
} |
|
58 |
asort($l_names); |
|
59 |
foreach($l_names as $l_name=>$v) { |
|
53 | 60 |
// Insert code and name |
54 | 61 |
$template->set_var(array( |
55 |
'CODE' => $addon['directory'],
|
|
56 |
'NAME' => $addon['name']
|
|
62 |
'CODE' => $l_codes[$l_name],
|
|
63 |
'NAME' => $l_name
|
|
57 | 64 |
)); |
58 | 65 |
// Check if it is selected |
59 |
if(LANGUAGE == $addon['directory']) {
|
|
66 |
if(LANGUAGE == $l_codes[$l_name]) {
|
|
60 | 67 |
$template->set_var('SELECTED', ' selected'); |
61 | 68 |
} else { |
62 | 69 |
$template->set_var('SELECTED', ''); |
Also available in: Unified diff
added workaround for language sorting-problem