|
@@ 91-98 (lines=8) @@
|
| 88 |
|
$oldFiles = array(XOOPS_ROOT_PATH . "/modules/" . $module->dirname() . "/include/xoopsformloader.php", |
| 89 |
|
XOOPS_ROOT_PATH . "/modules/" . $module->dirname() . "/include/blockform.php" |
| 90 |
|
); |
| 91 |
|
foreach($oldFiles as $file) { |
| 92 |
|
if (is_file($file)) { |
| 93 |
|
if (false === ($delOk = unlink($file))) { |
| 94 |
|
$module->setErrors(sprintf(_AM_ABOUT_ERROR_BAD_REMOVE, $file)); |
| 95 |
|
} |
| 96 |
|
$success = $success && $delOk; |
| 97 |
|
} |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
// Delete files from previous version (if they exist) |
| 101 |
|
// this is only executed if this version copied over old version without running module update |
|
@@ 105-112 (lines=8) @@
|
| 102 |
|
$oldFiles = array(XOOPS_PATH . "/modules/" . $module->dirname() . "/include/xoopsformloader.php", |
| 103 |
|
XOOPS_PATH . "/modules/" . $module->dirname() . "/include/blockform.php" |
| 104 |
|
); |
| 105 |
|
foreach($oldFiles as $file) { |
| 106 |
|
if (is_file($file)) { |
| 107 |
|
if (false === ($delOk = unlink($file))) { |
| 108 |
|
$module->setErrors(sprintf(_AM_ABOUT_ERROR_BAD_REMOVE, $file)); |
| 109 |
|
} |
| 110 |
|
$success = $success && $delOk; |
| 111 |
|
} |
| 112 |
|
} |
| 113 |
|
return $success; |
| 114 |
|
} |
| 115 |
|
|