From 68018c4739def2b9f2643a61a44eaabde34d7562 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 19 Nov 2010 16:09:26 +0000 Subject: [PATCH] Code alignment git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20300 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/departments/class_domain.inc | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/gosa-core/plugins/admin/departments/class_domain.inc b/gosa-core/plugins/admin/departments/class_domain.inc index 560503a7d..b72a68d45 100644 --- a/gosa-core/plugins/admin/departments/class_domain.inc +++ b/gosa-core/plugins/admin/departments/class_domain.inc @@ -22,78 +22,78 @@ class domain extends department { - /* attribute list for save action */ - var $attributes = array( "dc", "ou", "description","gosaUnitTag", "manager"); - var $objectclasses = array("top", "domain", "gosaDepartment"); - var $structuralOC = array("domain"); - var $type = "domain"; - var $dc = ""; - var $orgi_dc = ""; - var $namingAttr = "dc"; + /* attribute list for save action */ + var $attributes = array( "dc", "ou", "description","gosaUnitTag", "manager"); + var $objectclasses = array("top", "domain", "gosaDepartment"); + var $structuralOC = array("domain"); + var $type = "domain"; + var $dc = ""; + var $orgi_dc = ""; + var $namingAttr = "dc"; - var $manager_enabled = FALSE; - var $manager_name =""; - var $manager =""; + var $manager_enabled = FALSE; + var $manager_name =""; + var $manager =""; - function check() - { - $message = plugin::check(); + function check() + { + $message = plugin::check(); - /* Check for presence of this department */ - $ldap= $this->config->get_ldap_link(); - $ldap->ls ("(&(dc=".$this->dc.")(objectClass=domain))", $this->base, array('dn')); - if ($this->orig_dc == "new" && $ldap->count()){ - $message[]= msgPool::duplicated(_("Name")); - } elseif ($this->orig_dn != $this->dn && $ldap->count()){ - $message[]= msgPool::duplicated(_("Name")); - } + /* Check for presence of this department */ + $ldap= $this->config->get_ldap_link(); + $ldap->ls ("(&(dc=".$this->dc.")(objectClass=domain))", $this->base, array('dn')); + if ($this->orig_dc == "new" && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } elseif ($this->orig_dn != $this->dn && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } - /* All required fields are set? */ - if ($this->dc == ""){ - $message[]= msgPool::required(_("Name")); - }elseif(tests::is_department_name_reserved($this->dc,$this->base)){ - $message[]= msgPool::reserved(_("Name")); - }elseif(!preg_match ('/[a-z0-9 \.,\-_]/i', $this->dc)){ - $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/"); - } + /* All required fields are set? */ + if ($this->dc == ""){ + $message[]= msgPool::required(_("Name")); + }elseif(tests::is_department_name_reserved($this->dc,$this->base)){ + $message[]= msgPool::reserved(_("Name")); + }elseif(!preg_match ('/[a-z0-9 \.,\-_]/i', $this->dc)){ + $message[]= msgPool::invalid(_("Name"), $this->dc, "/[a-z0-9 \.,\-_]/"); + } - /* Check description */ - if ($this->description == ""){ - $message[]= msgPool::required(_("Description")); - } + /* Check description */ + if ($this->description == ""){ + $message[]= msgPool::required(_("Description")); + } - /* Check if we are allowed to create or move this object - */ - if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ - $message[] = msgPool::permCreate(); - }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ - $message[] = msgPool::permMove(); - } + /* Check if we are allowed to create or move this object + */ + if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } - return($message); - } + return($message); + } - /* Return plugin informations for acl handling */ - static function plInfo() - { - return (array("plShortName" => _("Domain Component"), - "plDescription" => _("Domain Component"), - "plSelfModify" => FALSE, - "plPriority" => 4, - "plDepends" => array(), - "plSection" => array("administration"), - "plCategory" => array("department"), + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array("plShortName" => _("Domain Component"), + "plDescription" => _("Domain Component"), + "plSelfModify" => FALSE, + "plPriority" => 4, + "plDepends" => array(), + "plSection" => array("administration"), + "plCategory" => array("department"), - "plProvidedAcls" => array( - "dc" => _("Name"), - "description" => _("Description"), - "base" => _("Base"), - "manager" => _("Manager"), - "gosaUnitTag" => _("Administrative settings")) - )); - } + "plProvidedAcls" => array( + "dc" => _("Name"), + "description" => _("Description"), + "base" => _("Base"), + "manager" => _("Manager"), + "gosaUnitTag" => _("Administrative settings")) + )); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -- 2.30.2