From 6be2e0eb1e8fa4cbf54e6bacd36d5d39a4f3b4f4 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 13 Aug 2013 09:48:35 -0400
Subject: [PATCH] Fixed: FS#3089 - FTP User Options - ERROR You have no permission for this domain.
---
interface/web/sites/ftp_user_edit.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php
index 0bc3801..c952a93 100644
--- a/interface/web/sites/ftp_user_edit.php
+++ b/interface/web/sites/ftp_user_edit.php
@@ -91,8 +91,10 @@
global $app, $conf;
// Get the record of the parent domain
- $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
- if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+ if(isset($this->dataRecord["parent_domain_id"])) {
+ $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+ if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+ }
// Set a few fixed values
$this->dataRecord["server_id"] = $parent_domain["server_id"];
--
Gitblit v1.9.1