tbrehm
2007-08-11 2e1086d1d59a433cc5ffab06b1b30c6c39163ab9
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');