Revision 68
Added by stefan about 19 years ago
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".