Revision 166
Added by ryan about 19 years ago
trunk/wb/modules/htmlarea/install.php | ||
---|---|---|
24 | 24 |
*/ |
25 | 25 |
|
26 | 26 |
if(defined('WB_URL')) { |
27 |
|
|
27 |
|
|
28 | 28 |
// Set the filename of the actual editor file |
29 | 29 |
$editor_file = $module_dir.'/htmlarea.zip'; |
30 | 30 |
|
31 |
// Setup the PclZip object |
|
32 |
$editor_archive = new PclZip($editor_file); |
|
31 |
if(file_exists($editor_file)) { |
|
32 |
|
|
33 |
// Setup the PclZip object |
|
34 |
$editor_archive = new PclZip($editor_file); |
|
33 | 35 |
|
34 |
// Unzip to module dir |
|
35 |
$list = $editor_archive->extract(PCLZIP_OPT_PATH, $module_dir); |
|
36 |
if(!$list) { |
|
37 |
$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNZIP']); |
|
36 |
// Unzip to module dir |
|
37 |
$list = $editor_archive->extract(PCLZIP_OPT_PATH, $module_dir); |
|
38 |
if(!$list) { |
|
39 |
$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNZIP']); |
|
40 |
} |
|
41 |
// Delete the zip file |
|
42 |
if(file_exists($editor_file)) { unlink($editor_file); } |
|
43 |
|
|
44 |
// Chmod all the editors files |
|
45 |
chmod_directory_contents($module_dir.'/htmlarea', OCTAL_FILE_MODE); |
|
46 |
|
|
38 | 47 |
} |
39 |
// Delete the zip file |
|
40 |
if(file_exists($editor_file)) { unlink($editor_file); } |
|
41 | 48 |
|
42 |
// Chmod all the editors files |
|
43 |
chmod_directory_contents($module_dir.'/htmlarea', OCTAL_FILE_MODE); |
|
44 |
|
|
45 | 49 |
} |
46 | 50 |
|
47 | 51 |
?> |
Also available in: Unified diff
Fixed HTMLArea install script