From 3c8b817a7798c9fca5582c1bed33c7c0394532dd Mon Sep 17 00:00:00 2001
From: Dominik <info@profi-webdesign.net>
Date: Thu, 20 Mar 2014 20:09:26 +0100
Subject: [PATCH] Solved problem with vhost subs and aliases with
 ServerAlias-Command

---
 server/plugins-available/apache2_plugin.inc.php | 2 +-
 server/plugins-available/nginx_plugin.inc.php   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index ade254c0e1..18c4ded613 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1094,7 +1094,7 @@ class apache2_plugin {
 		}
 
 		// get alias domains (co-domains and subdomains)
-		$aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND (type != 'vhostsubdomain' OR type != 'vhostalias')");
+		$aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND (type != 'vhostsubdomain' AND type != 'vhostalias')");
 		$alias_seo_redirects = array();
 		switch($data['new']['subdomain']) {
 		case 'www':
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 77deaa3a44..851a251ad9 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1309,7 +1309,7 @@ class nginx_plugin {
 		}
 
 		// get alias domains (co-domains and subdomains)
-		$aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND (type != 'vhostsubdomain' OR type != 'vhostalias')");
+		$aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND (type != 'vhostsubdomain' AND type != 'vhostalias')");
 		$alias_seo_redirects = array();
 		if(is_array($aliases)) {
 			foreach($aliases as $alias) {
-- 
GitLab