summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: feb9476)
raw | patch | inline | side by side (parent: feb9476)
author | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Oct 2007 10:37:18 +0000 (10:37 +0000) | ||
committer | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Oct 2007 10:37:18 +0000 (10:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5-plugins@7571 594d385d-05f5-0310-b6e9-bd551577e9d8
vhost-apache2/class_apacheEditVhost.inc | patch | blob | history | |
vhost-apache2/class_apacheVhost.inc | patch | blob | history | |
vhost-apache2/functions_apache.inc | patch | blob | history |
index 37422c518ed8f52111956bd2148b85fb091b58b0..3eb4553077a1b4913c05cfa9eb71fe9c02336747 100644 (file)
<?php
-class servapacheeditVhost extends plugin
+class apacheVhostEdit extends plugin
{
/* attribute list for save action */
var $ignore_account= TRUE;
var $cn;
var $VhostObject = array();
- function servapache2editVhost ($config, $dn= NULL,$attrs = array())
+ function apacheVhostEdit ($config, $dn= NULL,$attrs = array())
{
plugin::plugin ($config, $dn);
}
}
- /* TRansports the geiven Arraykey one position up*/
+ /* Transports the given Arraykey one position up*/
function ArrayUp($atr,$attrs)
{
$ret = $attrs;
}
- /* TRansports the geiven Arraykey one position up*/
+ /* Transports the given Arraykey one position down*/
function ArrayDown($atr,$attrs)
{
$ret = $attrs;
}else{
$smarty->assign("AllowVhostEdit" , true);
if(isset($_POST['EditVhostEntries'])){
- $this->dialog= new servAPACHE2editVhostEntries($this->config,$this->dn,$this->VhostObject);
+ $this->dialog= new apacheVhostEditEntries($this->config,$this->dn,$this->VhostObject);
}
}
$smarty->assign("apacheServerAlias", $div->DrawList());
-
-
$div = new DivSelectBox("apacheScriptAlias");
$div->setHeight(120);
$recs = $this->apacheScriptAlias;
));
}
-
$smarty->assign("NotNew", false);
- $smarty->assign("apacheScriptAlias", $div->DrawList());
-
-
+ $smarty->assign("apacheScriptAlias", $div->DrawList());
/* Display template */
$display.= $smarty->fetch(get_template_path('apache_editVhost.tpl', TRUE));
$message= plugin::check();
/* Check if apacheServerName is already in use */
- $usedVhosts = $this->getUsedapacheServerNames();
+ $usedVhosts = $this->getUsedServerNames();
if(($this->isNew == true)||($this->apacheServerName != $this->InitialApacheServerName)){
/* if((isset($usedVhosts[$this->apacheServerName]))&&($this->apacheServerName != $this->InitialApacheServerName)){
$message[] =_("This apacheServerName is already in use");
}
/* This funtion returns all used apacheServerNames */
- function getUsedapacheServerNames()
+ function getUsedServerNames()
{
$ret = array();
$ldap = $this->config->get_ldap_link();
index 9c9ca50f082107f1c9b8cf10678b9547b149334a..90bf51bbe00de33c7e3fc32b4af8d7a823ab9d44 100644 (file)
var $APACHE2initially_was_account;
- function servapache2 ($config, $dn= NULL, $parent= NULL)
+ function servapache ($config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
/* Get all vhost Informations
*/
- $this->Vhosts = getAPACHE2VhostEntries($config,$dn);
+ $this->Vhosts = getVhostEntries($config,$dn);
/* If there is at least one entry in this -> types, we have APACHE2 enabled
*/
}
if ($this->is_account){
- $display= $this->show_header(_("Remove APACHE2 service"),
- _("This server has APACHE2 features enabled. You can disable them by clicking below."));
+ $display= $this->show_header(_("Remove Apache service"),
+ _("This server has Apache features enabled. You can disable them by clicking below."));
} else {
- $display= $this->show_header(_("Add APACHE2 service"),
- _("This server has APACHE2 features disabled. You can enable them by clicking below."));
+ $display= $this->show_header(_("Add Apache service"),
+ _("This server has Apache features disabled. You can enable them by clicking below."));
return ($display);
}
/* Add empty new vhost
*/
if(isset($_POST['AddVhost']) && chkacl($this->acl,"servapache2") == ""){
- $this->dialog = new servapache2editVhost($this->config,$this->dn);
+ $this->dialog = new apacheEditVhost($this->config,$this->dn);
}
/* Check for edit vhost request
$once =true;
$tmp = preg_replace("/^editVhost_/","",$name);
$tmp = base64_decode(preg_replace("/_.*$/","",$tmp));
- $this->dialog= new servapache2editVhost($this->config,$this->dn,$this->Vhosts[$tmp]);
+ $this->dialog= new apacheEditVhost($this->config,$this->dn,$this->Vhosts[$tmp]);
}
/* check posts for delete vhost
*/
function RemoveVhost($id)
{
- $vhosts = $this->getUsedapacheServerNames();
+ $vhosts = $this->getUsedServerNames();
$vhostname = "";
if(isset($this->Vhosts[$id]['InitialApacheServerName'])){
}
- /* This funtion returns all used Vhostnames
+ /* This function returns all used Vhostnames
*/
- function getUsedapacheServerNames()
+ function getUsedServerNames()
{
$ret = array();
$ldap = $this->config->get_ldap_link();
- /* Remove apache2 service
+ /* Remove apache service
*/
function remove_from_parent()
{
$old_dn = $this->dn;
}
- $tmp = getAPACHE2VhostEntriesDiff($this->config,$this->Vhosts,$old_dn);
+ $tmp = getVhostEntriesDiff($this->config,$this->Vhosts,$old_dn);
/* Updated vhost entries if reverser or forward name has changed
* Must be done before moving entries, else the given dn is invalid
foreach($tmp['vhostUpdates'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->modify($attrs);
- show_ldap_error("Vhost:".$ldap->get_error(), _("Updating APACHE2 service failed"));
+ show_ldap_error("Vhost:".$ldap->get_error(), _("Updating Apache service failed"));
}
}
- /* Delete apache2
+ /* Delete apache vhost
*/
foreach($tmp['del'] as $dn => $del){
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
- show_ldap_error($ldap->get_error(), _("Removing APACHE2 entries failed"));
+ show_ldap_error($ldap->get_error(), _("Removing Apache entries failed"));
}
/* move follwoing entries
$this->recursive_move($src,$dst);
}
- /* Add || Update new APACHE2 entries
+ /* Add || Update new apache entries
*/
foreach($tmp['add'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->cd($dn);
$ldap->add($attrs);
}
- show_ldap_error($ldap->get_error(), _("Saving APACHE2 entries failed"));
+ show_ldap_error($ldap->get_error(), _("Saving apache entries failed"));
}
}
}
index 8a82179949587b3797fc0cc6337921854152ba7e..9f11882f16a796dc28437c20524c88d27b33b28a 100644 (file)
<?php
-/* This function returns the zones specified for given host
+/* This function returns the vhost entries specified for given host
*/
function getVhostEntries($config,$HostDn,$silent = false)
{
*/
foreach($tmp_res as $attrs){
- $apacheServerName = $attrs['apacheServerName'][0];
- $apacheDocumentRoot = $attrs['apacheDocumentRoot'][0];
+ $apacheServerName = $attrs['apacheServerName'][0];
+ $apacheDocumentRoot = $attrs['apacheDocumentRoot'][0];
$apacheServerAdmin = $attrs['apacheServerAdmin'][0];
$Vhosts[$apacheServerName] = $VhostBase;
$Vhosts[$apacheServerName]['exists'] = true;
/* This function compares two dns zone objects and returns an
* array with following indexes
- * - delete, for dns which must be deleted (only if dns zone is removed)
+ * - delete, for vhost entries which must be deleted (only if vhost entries is removed)
* - rename, if a dn must be renamed, for example, the apacheServerName has changed
- * - add, if there is a new dns account created
+ * - add, if there is a new vhost entries created
*/
function getVhostEntriesDiff($config,$newVhosts,$HostDn)
{
- $oldVhosts = getAPACHE2VhostEntries($config,$HostDn,true);
+ $oldVhosts = getVhostEntries($config,$HostDn,true);
$move = array();
$add = array();