Fix historylog, links & categories sticking around if app is deleted

This commit is contained in:
Nathan Gray 2013-01-14 20:25:37 +00:00
parent eb104a9ee5
commit 6cae734945
3 changed files with 10 additions and 1 deletions

View File

@ -141,7 +141,8 @@ if(@get_var('submit',Array('POST')))
echo '<br />' . $app_title . ' ' . lang('hooks deregistered') . '.'; echo '<br />' . $app_title . ' ' . lang('hooks deregistered') . '.';
} }
if ($historylog->delete($appname)) $historylog->appname = $appname;
if ($historylog->delete(null))
{ {
echo '<br />' . $app_title . ' ' . lang('Historylog removed') . '.'; echo '<br />' . $app_title . ' ' . lang('Historylog removed') . '.';
} }

View File

@ -650,10 +650,16 @@ class setup
// Remove categories // Remove categories
$this->db->delete(categories::TABLE, array('cat_appname'=>$appname),__LINE__,__FILE__); $this->db->delete(categories::TABLE, array('cat_appname'=>$appname),__LINE__,__FILE__);
categories::invalidate_cache($appname);
// Remove config // Remove config
$this->db->delete(config::TABLE, array('config_app'=>$appname),__LINE__,__FILE__); $this->db->delete(config::TABLE, array('config_app'=>$appname),__LINE__,__FILE__);
//echo 'DELETING application: ' . $appname; //echo 'DELETING application: ' . $appname;
$this->db->delete($this->applications_table,array('app_name'=>$appname),__LINE__,__FILE__); $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(); $this->clear_session_cache();
} }

View File

@ -462,6 +462,8 @@ class setup_process
} }
/* $appdata['status'] = 'C'; */ /* $appdata['status'] = 'C'; */
} }
// Clear categories cache in case app adds categories
categories::invalidate_cache();
/* Done, return current status */ /* Done, return current status */
return ($setup_info); return ($setup_info);