Fixed: FS#3312 - Bug in APS remove
| | |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE, DELETE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' "; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, DELETE ON ".$value['db'].".`aps_instances_settings` TO '".$value['user']."'@'".$host."' "; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | |
| | | { |
| | | $app->db->query('DELETE FROM aps_instances WHERE id = "'.$app->db->quote($task['instance_id']).'";'); |
| | | $app->db->query('DELETE FROM aps_instances_settings WHERE instance_id = "'.$app->db->quote($task['instance_id']).'";'); |
| | | if ($app->dbmaster != $app->db) { |
| | | $app->dbmaster->query('DELETE FROM aps_instances WHERE id = "'.$app->db->quote($task['instance_id']).'";'); |
| | | $app->dbmaster->query('DELETE FROM aps_instances_settings WHERE instance_id = "'.$app->db->quote($task['instance_id']).'";'); |
| | | } |
| | | } |
| | | |
| | | unset($sxe); |