| 1 |
70
|
stefan
|
<?php
|
| 2 |
|
|
|
| 3 |
|
|
if(defined('WB_URL')) {
|
| 4 |
|
|
|
| 5 |
|
|
// Set the filename of the actual editor file
|
| 6 |
|
|
$editor_file = $module_dir.'/htmlarea.zip';
|
| 7 |
|
|
|
| 8 |
|
|
// Setup the PclZip object
|
| 9 |
|
|
$editor_archive = new PclZip($editor_file);
|
| 10 |
|
|
|
| 11 |
|
|
// Unzip FCKeditor to the module dir
|
| 12 |
|
|
$list = $editor_archive->extract(PCLZIP_OPT_PATH, $module_dir);
|
| 13 |
|
|
if(!$list) {
|
| 14 |
|
|
$admin->print_error($MESSAGE['GENERIC']['CANNOT_UNZIP']);
|
| 15 |
|
|
}
|
| 16 |
|
|
// Delete the zip file
|
| 17 |
|
|
if(file_exists($editor_file)) { unlink($editor_file); }
|
| 18 |
|
|
|
| 19 |
|
|
// Chmod all the editors files
|
| 20 |
|
|
chmod_directory_contents($module_dir.'/htmlarea', OCTAL_FILE_MODE);
|
| 21 |
|
|
|
| 22 |
|
|
}
|
| 23 |
|
|
|
| 24 |
|
|
?>
|