Till Brehm
2014-02-15 e92eda2016655c8e9aea85c320d11a1487e6b556
Fixed: FS#3312 - Bug in APS remove
2 files modified
14 ■■■■■ changed files
install/lib/installer_base.lib.php 10 ●●●●● patch | view | raw | blame | history
server/lib/classes/aps_installer.inc.php 4 ●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php
@@ -474,7 +474,15 @@
                    $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";
                }
server/lib/classes/aps_installer.inc.php
@@ -739,6 +739,10 @@
        {
            $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);