Revision 211
Added by stefan about 19 years ago
trunk/wb/install/save.php | ||
---|---|---|
581 | 581 |
// Load addons into DB |
582 | 582 |
$dirs['modules'] = WB_PATH.'/modules/'; |
583 | 583 |
$dirs['templates'] = WB_PATH.'/templates/'; |
584 |
$dirs['language'] = WB_PATH.'/languages/'; |
|
584 |
$dirs['languages'] = WB_PATH.'/languages/';
|
|
585 | 585 |
foreach($dirs AS $type => $dir) { |
586 | 586 |
if($handle = opendir($dir)) { |
587 | 587 |
while(false !== ($file = readdir($handle))) { |
trunk/wb/admin/templates/uninstall.php | ||
---|---|---|
63 | 63 |
$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL']); |
64 | 64 |
} else { |
65 | 65 |
// Remove entry from DB |
66 |
$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE directory = '".$file."' AND type = 'template' LIMIT 0,1");
|
|
66 |
$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE directory = '".$file."' AND type = 'template'"); |
|
67 | 67 |
} |
68 | 68 |
|
69 | 69 |
// Update pages that use this template with default template |
trunk/wb/admin/templates/install.php | ||
---|---|---|
120 | 120 |
} |
121 | 121 |
|
122 | 122 |
// Load template info into DB |
123 |
load_module($template_dir);
|
|
123 |
load_template($template_dir);
|
|
124 | 124 |
|
125 | 125 |
// Print success message |
126 | 126 |
$admin->print_success($success_message); |
trunk/wb/admin/languages/uninstall.php | ||
---|---|---|
56 | 56 |
$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNINSTALL']); |
57 | 57 |
} else { |
58 | 58 |
// Remove entry from DB |
59 |
$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE directory = '".$_POST['code']."' AND type = 'language' LIMIT 0,1");
|
|
59 |
$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE directory = '".$_POST['code']."' AND type = 'language'"); |
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
// Print success message |
trunk/wb/admin/languages/install.php | ||
---|---|---|
97 | 97 |
change_mode($language_file, 'file'); |
98 | 98 |
|
99 | 99 |
// Load language info into DB |
100 |
load_module(WB_PATH.'/languages/'.$language_file);
|
|
100 |
load_language($language_file);
|
|
101 | 101 |
|
102 | 102 |
// Restore to correct language |
103 | 103 |
require(WB_PATH.'/languages/'.LANGUAGE.'.php'); |
Also available in: Unified diff
Fixed bug #33 and other bugs regarding addon (un)installation