diff --git a/vhost-apache2/src/class_servApacheVhost.inc b/vhost-apache2/src/class_servApacheVhost.inc
index 495da74853eb498bca6c0e01beccad723f3f4fb5..4b97104b33b865a7c9a64b5571f958fa3630246d 100644 (file)
/* Initiate deletion
*/
- $this->RemoveVhost($tmp);
+ $this->RemoveVhost($tmp);
}
}
$smarty->assign("servapacheACL",chkacl($this->acl,"servapache"));
- /* Display tempalte
+ /* Display template
*/
$smarty->assign("VhostList",$VhostList->DrawList());
$display.= $smarty->fetch(get_template_path('servApacheVhost.tpl', TRUE));
/* Delete specified vhost
- */
+ */
function RemoveVhost($id)
{
- $vhosts = $this->getUsedServerNames();
-
- $vhostname = "";
- if(isset($this->Vhosts[$id]['InitialApacheServerName'])){
- $vhostname= $this->Vhosts[$id]['InitialApacheServerName'];
- }
-
- $used = array();
-
- /* Add Records which use this apacheServerName
- */
- if(isset($vhosts[$vhostname])){
- $used = array_merge($used,$vhosts[$vhostname]);
- }
-
-
- /* There are still entries using this configuration
- * Abort deletion
- */
- if(count($used)){
- $i = 2;
- $str ="";
- foreach($used as $dn){
- if($i > 0 ){
- $i --;
- $str.=$dn." ";
- }
- }
-
- /* Only show 2 apache in the error message
- */
- if(count($used)> 2) {
- $str .=" ... ";
- }
- print_red(sprintf(_("Can't delete the selected vhost, because it is still in use by these entry/entries '%s'"),trim($str)));
-
- }else{
unset($this->Vhosts[$id]);
return(true);
- }
- return(false);
- }
+ }
/* This function returns all used Vhostnames