Revision 68
Added by stefan about 20 years ago
| trunk/wb/languages/EN.php | ||
|---|---|---|
| 492 | 492 |
$MESSAGE['GENERIC']['CANNOT_UNINSTALL'] = 'Cannot uninstall'; |
| 493 | 493 |
$MESSAGE['GENERIC']['CANNOT_UNZIP'] = 'Cannot unzip file'; |
| 494 | 494 |
$MESSAGE['GENERIC']['INSTALLED'] = 'Installed successfully'; |
| 495 |
$MESSAGE['GENERIC']['INSTALLED'] = 'Upgraded successfully'; |
|
| 495 | 496 |
$MESSAGE['GENERIC']['UNINSTALLED'] = 'Uninstalled successfully'; |
| 496 | 497 |
$MESSAGE['GENERIC']['BAD_PERMISSIONS'] = 'Unable to write to the target directory'; |
| 497 | 498 |
$MESSAGE['GENERIC']['INVALID'] = 'The file you uploaded is invalid'; |
| trunk/wb/admin/modules/install.php | ||
|---|---|---|
| 70 | 70 |
// Check if this module is already installed |
| 71 | 71 |
// and compare versions if so |
| 72 | 72 |
$new_module_version=$module_version; |
| 73 |
$action="install"; |
|
| 73 | 74 |
if(is_dir(WB_PATH.'/modules/'.$module_directory)) {
|
| 74 | 75 |
if(file_exists(WB_PATH.'/modules/'.$module_directory.'/info.php')) {
|
| 75 | 76 |
require(WB_PATH.'/modules/'.$module_directory.'/info.php'); |
| ... | ... | |
| 79 | 80 |
$admin->print_error($MESSAGE['GENERIC']['ALREADY_INSTALLED']); |
| 80 | 81 |
} |
| 81 | 82 |
$action="upgrade"; |
| 82 |
} else {
|
|
| 83 |
$action="install"; |
|
| 84 |
} |
|
| 83 |
} |
|
| 85 | 84 |
} |
| 86 | 85 |
|
| 87 |
|
|
| 88 | 86 |
// Check if module dir is writable |
| 89 | 87 |
if(!is_writable(WB_PATH.'/modules/')) {
|
| 90 | 88 |
if(file_exists($temp_file)) { unlink($temp_file); } // Remove temp file
|
| ... | ... | |
| 122 | 120 |
} |
| 123 | 121 |
|
| 124 | 122 |
// Print success message |
| 125 |
$admin->print_success($MESSAGE['GENERIC']['INSTALLED']); |
|
| 123 |
if ($action="install") {
|
|
| 124 |
$admin->print_success($MESSAGE['GENERIC']['INSTALLED']); |
|
| 125 |
} else if ($action="upgrade") {
|
|
| 126 |
$admin->print_success($MESSAGE['GENERIC']['UPGRADED']); |
|
| 127 |
} |
|
| 126 | 128 |
|
| 129 |
|
|
| 127 | 130 |
// Print admin footer |
| 128 | 131 |
$admin->print_footer(); |
| 129 | 132 |
|
Also available in: Unified diff
Fixed bug in new module installation routine. Added language string "Upgraded successfully".