diff --git a/setup/applications.php b/setup/applications.php
index 335b45b896..78a1e8efbf 100644
--- a/setup/applications.php
+++ b/setup/applications.php
@@ -141,7 +141,8 @@ if(@get_var('submit',Array('POST')))
echo '
' . $app_title . ' ' . lang('hooks deregistered') . '.';
}
- if ($historylog->delete($appname))
+ $historylog->appname = $appname;
+ if ($historylog->delete(null))
{
echo '
' . $app_title . ' ' . lang('Historylog removed') . '.';
}
diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php
index 80380a38b7..f0a5d39216 100644
--- a/setup/inc/class.setup.inc.php
+++ b/setup/inc/class.setup.inc.php
@@ -650,10 +650,16 @@ class setup
// Remove categories
$this->db->delete(categories::TABLE, array('cat_appname'=>$appname),__LINE__,__FILE__);
+ categories::invalidate_cache($appname);
+
// Remove config
$this->db->delete(config::TABLE, array('config_app'=>$appname),__LINE__,__FILE__);
//echo 'DELETING application: ' . $appname;
$this->db->delete($this->applications_table,array('app_name'=>$appname),__LINE__,__FILE__);
+
+ // Remove links to the app
+ $links = egw_link::unlink(0, $appname);
+
$this->clear_session_cache();
}
diff --git a/setup/inc/class.setup_process.inc.php b/setup/inc/class.setup_process.inc.php
index 742db19412..6216983ef8 100755
--- a/setup/inc/class.setup_process.inc.php
+++ b/setup/inc/class.setup_process.inc.php
@@ -462,6 +462,8 @@ class setup_process
}
/* $appdata['status'] = 'C'; */
}
+ // Clear categories cache in case app adds categories
+ categories::invalidate_cache();
/* Done, return current status */
return ($setup_info);