| @@ 312-318 (lines=7) @@ | ||
| 309 | // if there was an error, delete the tables created so far, |
|
| 310 | // so the next installation will not fail |
|
| 311 | if (count($this->error) > 0) { |
|
| 312 | foreach ($created_tables as $table) { |
|
| 313 | try { |
|
| 314 | $xoops->db()->query('DROP TABLE ' . $xoops->db()->prefix($table)); |
|
| 315 | } catch (Exception $e) { |
|
| 316 | $xoops->events()->triggerEvent('core.exception', $e); |
|
| 317 | } |
|
| 318 | } |
|
| 319 | return false; |
|
| 320 | } |
|
| 321 | } |
|
| @@ 331-337 (lines=7) @@ | ||
| 328 | XoopsLocale::EF_NOT_INSERTED_TO_DATABASE, |
|
| 329 | '<strong>' . $module->getVar('name') . '</strong>' |
|
| 330 | ); |
|
| 331 | foreach ($created_tables as $ct) { |
|
| 332 | try { |
|
| 333 | $xoops->db()->query('DROP TABLE ' . $xoops->db()->prefix($ct)); |
|
| 334 | } catch (Exception $e) { |
|
| 335 | $xoops->events()->triggerEvent('core.exception', $e); |
|
| 336 | } |
|
| 337 | } |
|
| 338 | $this->error[] = sprintf(XoopsLocale::EF_NOT_INSTALLED, "<strong>" . $module->name() . "</strong>"); |
|
| 339 | $this->error[] = XoopsLocale::C_ERRORS; |
|
| 340 | unset($module); |
|