tbrehm
2009-02-12 4fa7eb02662eccdb52681aba623a0f97077f961d
server/plugins-available/apache2_plugin.inc.php
@@ -634,6 +634,19 @@
      $app->uses("getconf");
      $web_config = $app->getconf->get_server_config($conf["server_id"], 'web');
      
      if($data["old"]["type"] != "vhost" && $data["old"]["parent_domain_id"] > 0) {
         //* This is a alias domain or subdomain, so we have to update the website instead
         $parent_domain_id = intval($data["old"]["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;
         $this->action = 'update';
         // just run the update function
         $this->update($event_name,$data);
      } else {
         //* This is a website
      // Deleting the vhost file, symlink and the data directory
      $vhost_symlink = escapeshellcmd($web_config["vhost_conf_enabled_dir"].'/'.$data["old"]["domain"].'.vhost');
      unlink($vhost_symlink);
@@ -702,6 +715,7 @@
      $command .= ' '.$data["old"]["system_user"];         
      exec($command);
   }
   }
   
   //* This function is called when a IP on the server is inserted, updated or deleted
   function server_ip($event_name,$data) {