From 6bd166ea3754cf42c485c7ecdbdf65efa9889c2c Mon Sep 17 00:00:00 2001
From: Dominik Müller <info@profi-webdesign.com>
Date: Sat, 03 Jan 2015 09:24:49 -0500
Subject: [PATCH] Added APS-Funktions to remote API Removed possibility of reinstalling Instances
---
interface/web/sites/aps_do_operation.php | 25 -------------------------
1 files changed, 0 insertions(+), 25 deletions(-)
diff --git a/interface/web/sites/aps_do_operation.php b/interface/web/sites/aps_do_operation.php
index b4d9493..ffc8c03 100644
--- a/interface/web/sites/aps_do_operation.php
+++ b/interface/web/sites/aps_do_operation.php
@@ -84,29 +84,4 @@
//echo $app->lng('Installation_remove');
@header('Location:aps_installedpackages_list.php');
}
-else if($_GET['action'] == 'reinstall_instance')
- {
- // Make sure a valid package ID is given (also corresponding to the calling user)
- $client_id = 0;
- $is_admin = ($_SESSION['s']['user']['typ'] == 'admin') ? true : false;
- if(!$is_admin)
- {
- $cid = $app->db->queryOneRecord("SELECT client_id FROM client WHERE username = '".$app->db->quote($_SESSION['s']['user']['username'])."';");
- $client_id = $cid['client_id'];
- }
- // Assume that the given instance belongs to the currently calling client_id. Unimportant if status is admin
- if(!$gui->isValidInstanceID($_GET['id'], $client_id, $is_admin)) die($app->lng('Invalid ID'));
-
- // We've an InstanceID, so make sure the package is not enabled and InstanceStatus is still "installed"
- $check = $app->db->queryOneRecord("SELECT aps_instances.id FROM aps_instances, aps_packages
- WHERE aps_instances.package_id = aps_packages.id
- AND aps_instances.instance_status = ".INSTANCE_SUCCESS."
- AND aps_packages.package_status = ".PACKAGE_ENABLED."
- AND aps_instances.id = ".$app->db->quote($_GET['id']).";");
- if(!$check) die('Check failed'); // normally this might not happen at all, so just die
-
- $gui->reinstallInstance($_GET['id']);
- //echo $app->lng('Installation_task');
- @header('Location:aps_installedpackages_list.php');
- }
?>
--
Gitblit v1.9.1