Revision 169
Added by ryan about 19 years ago
index.php | ||
---|---|---|
35 | 35 |
|
36 | 36 |
// Insert values into language list |
37 | 37 |
$template->set_block('main_block', 'language_list_block', 'language_list'); |
38 |
if ($handle = opendir(WB_PATH.'/languages/')) { |
|
39 |
while (false !== ($file = readdir($handle))) { |
|
40 |
if($file != '.' AND $file != '..' AND $file != '.svn' AND $file != 'index.php') { |
|
41 |
// Include the languages info file |
|
42 |
require(WB_PATH.'/languages/'.$file); |
|
43 |
$template->set_var('VALUE', $language_code); |
|
44 |
$template->set_var('NAME', $language_name.' ('.$language_code.')'); |
|
45 |
$template->parse('language_list', 'language_list_block', true); |
|
46 |
} |
|
38 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language'"); |
|
39 |
if($result->numRows() > 0) { |
|
40 |
while ($addon = $result->fetchRow()) { |
|
41 |
$template->set_var('VALUE', $addon['directory']); |
|
42 |
$template->set_var('NAME', $addon['name'].' ('.$addon['directory'].')'); |
|
43 |
$template->parse('language_list', 'language_list_block', true); |
|
47 | 44 |
} |
48 |
// Restore language to original file |
|
49 |
require(WB_PATH.'/languages/'.LANGUAGE.'.php'); |
|
50 | 45 |
} |
51 | 46 |
|
52 | 47 |
// Insert permissions values |
Also available in: Unified diff
Fixed addon listing in numerous places so it now use's DB for info