From ea379616f044da73c8f927e2ed4bbb23516c8fdb Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 02 Aug 2007 08:20:10 -0400
Subject: [PATCH] Added client limits to the DNS module.
---
server/plugins-enabled/apache2_plugin.inc.php | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/server/plugins-enabled/apache2_plugin.inc.php b/server/plugins-enabled/apache2_plugin.inc.php
index c02bc3c..9b33467 100644
--- a/server/plugins-enabled/apache2_plugin.inc.php
+++ b/server/plugins-enabled/apache2_plugin.inc.php
@@ -68,7 +68,7 @@
if($data["new"]["type"] != "vhost" && $data["new"]["parent_domain_id"] > 0) {
// This is not a vhost, so we need to update the parent record instead.
$parent_domain_id = intval($data["new"]["parent_domain_id"]);
- $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$parent_domain_id);
+ $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$parent_domain_id." AND active = 'y'");
$data["new"] = $tmp;
$data["old"] = $tmp;
}
@@ -150,7 +150,7 @@
}
// get alias domains (co-domains and subdomains)
- $aliases = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$data["new"]["domain_id"]);
+ $aliases = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$data["new"]["domain_id"]." AND active = 'y'");
$server_alias = '';
if(is_array($aliases)) {
foreach($aliases as $alias) {
@@ -165,6 +165,11 @@
}
}
$tpl->setVar('alias',trim($server_alias));
+ if(count($rewrite_rules) > 0) {
+ $tpl->setVar('rewrite_enabled',1);
+ } else {
+ $tpl->setVar('rewrite_enabled',0);
+ }
$tpl->setLoop('redirects',$rewrite_rules);
$vhost_file = escapeshellcmd($web_config["vhost_conf_dir"].'/'.$data["new"]["domain"].'.vhost');
--
Gitblit v1.9.1