Added error handling to installation of modules
This commit is contained in:
@@ -116,6 +116,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
|||||||
<change>Applied patch for folders with special characters (upload module)</change>
|
<change>Applied patch for folders with special characters (upload module)</change>
|
||||||
<change>Reworked parts of calendar block</change>
|
<change>Reworked parts of calendar block</change>
|
||||||
<change>Fixed missing CSS for li-tags of calendar</change>
|
<change>Fixed missing CSS for li-tags of calendar</change>
|
||||||
|
<change>Added error handling to installation of modules</change>
|
||||||
</changelog>
|
</changelog>
|
||||||
<changelog lang="de">
|
<changelog lang="de">
|
||||||
<change>Fehlendes IF $S_BLOCK_ICON hinzugefügt</change>
|
<change>Fehlendes IF $S_BLOCK_ICON hinzugefügt</change>
|
||||||
@@ -125,6 +126,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
|||||||
<change>Patch für Ordner mit Spezialcharaktern hinzugefügt (Upload Modul)</change>
|
<change>Patch für Ordner mit Spezialcharaktern hinzugefügt (Upload Modul)</change>
|
||||||
<change>Teile des Kalender Blocks überarbeitet</change>
|
<change>Teile des Kalender Blocks überarbeitet</change>
|
||||||
<change>Fehlendes CSS für li-tags des Kalenders hinzugefügt</change>
|
<change>Fehlendes CSS für li-tags des Kalenders hinzugefügt</change>
|
||||||
|
<change>Fehlerbehandlung zu Installation von Modulen hinzugefügt</change>
|
||||||
</changelog>
|
</changelog>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
|
|||||||
@@ -739,9 +739,29 @@ class acp_portal
|
|||||||
|
|
||||||
$module_id = $db->sql_nextid();
|
$module_id = $db->sql_nextid();
|
||||||
|
|
||||||
$c_class->install($module_id);
|
$error = $c_class->install($module_id);
|
||||||
|
|
||||||
$cache->purge(); // make sure we don't get errors after re-adding a module
|
$cache->purge(); // make sure we don't get errors after re-adding a module
|
||||||
|
|
||||||
|
// if something went wrong, handle the errors accordingly and undo the above query
|
||||||
|
if (sizeof($error))
|
||||||
|
{
|
||||||
|
if (is_array($error))
|
||||||
|
{
|
||||||
|
foreach($error as $cur_error)
|
||||||
|
{
|
||||||
|
$error_output = $cur_error . '<br />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($error != false)
|
||||||
|
{
|
||||||
|
$error_output = $error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'DELETE FROM ' . PORTAL_MODULES_TABLE . ' WHERE module_id = ' . (int) $module_id;
|
||||||
|
|
||||||
|
trigger_error($error_output . adm_back_link($this->u_action));
|
||||||
|
}
|
||||||
|
|
||||||
meta_refresh(3, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id));
|
meta_refresh(3, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user