From 12e945f64aca503004e3e41fb2e96a986ba58d81 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 19 Nov 2010 16:18:01 +0000 Subject: [PATCH] Just code aligment git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20302 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../departments/class_countryGeneric.inc | 126 +++++----- .../admin/departments/class_dcObject.inc | 122 +++++----- .../departments/class_localityGeneric.inc | 126 +++++----- .../departments/class_organizationGeneric.inc | 220 +++++++++--------- 4 files changed, 297 insertions(+), 297 deletions(-) diff --git a/gosa-core/plugins/admin/departments/class_countryGeneric.inc b/gosa-core/plugins/admin/departments/class_countryGeneric.inc index f69343431..1b0161808 100644 --- a/gosa-core/plugins/admin/departments/class_countryGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_countryGeneric.inc @@ -22,79 +22,79 @@ class country extends department { - /* attribute list for save action */ - var $attributes = array( "c", "ou", "description","gosaUnitTag", "manager"); - var $objectclasses = array("top", "gosaDepartment"); - var $structuralOC = array("country"); - var $type ="country"; - var $c =""; - var $orgi_c =""; + /* attribute list for save action */ + var $attributes = array( "c", "ou", "description","gosaUnitTag", "manager"); + var $objectclasses = array("top", "gosaDepartment"); + var $structuralOC = array("country"); + var $type ="country"; + var $c =""; + var $orgi_c =""; - var $namingAttr = "c"; - var $manager_enabled = FALSE; - var $manager_name =""; - var $manager =""; + var $namingAttr = "c"; + var $manager_enabled = FALSE; + var $manager_name =""; + var $manager =""; - function check() - { - $message = plugin::check(); - - /* Check for presence of this department */ - $ldap= $this->config->get_ldap_link(); - $ldap->ls ("(&(c=".$this->c.")(objectClass=country))", $this->base, array('dn')); - if ($this->orig_c == "new" && $ldap->count()){ - $message[]= msgPool::duplicated(_("Name")); - } elseif ($this->orig_dn != $this->dn && $ldap->count()){ - $message[]= msgPool::duplicated(_("Name")); - } + function check() + { + $message = plugin::check(); - /* All required fields are set? */ - if ($this->c == ""){ - $message[]= msgPool::required(_("Name")); - }elseif(tests::is_department_name_reserved($this->c,$this->base)){ - $message[]= msgPool::reserved(_("Name")); - }elseif(preg_match ('/[#+:=>\\\\\/]/', $this->c)){ - $message[]= msgPool::invalid(_("Name"), $this->c, "/[^#+:=>\\\\\/]/"); - } + /* Check for presence of this department */ + $ldap= $this->config->get_ldap_link(); + $ldap->ls ("(&(c=".$this->c.")(objectClass=country))", $this->base, array('dn')); + if ($this->orig_c == "new" && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } elseif ($this->orig_dn != $this->dn && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } - /* Check description */ - if ($this->description == ""){ - $message[]= msgPool::required(_("Description")); - } + /* All required fields are set? */ + if ($this->c == ""){ + $message[]= msgPool::required(_("Name")); + }elseif(tests::is_department_name_reserved($this->c,$this->base)){ + $message[]= msgPool::reserved(_("Name")); + }elseif(preg_match ('/[#+:=>\\\\\/]/', $this->c)){ + $message[]= msgPool::invalid(_("Name"), $this->c, "/[^#+:=>\\\\\/]/"); + } - /* 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 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(); + } - return($message); - } + return($message); + } - /* Return plugin informations for acl handling */ - static function plInfo() - { - return (array( - "plShortName" => _("Country"), - "plDescription" => _("Country"), - "plSelfModify" => FALSE, - "plPriority" => 2, - "plDepends" => array(), - "plSection" => array("administration"), - "plCategory" => array("department"), + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array( + "plShortName" => _("Country"), + "plDescription" => _("Country"), + "plSelfModify" => FALSE, + "plPriority" => 2, + "plDepends" => array(), + "plSection" => array("administration"), + "plCategory" => array("department"), - "plProvidedAcls" => array( - "c" => _("Country name"), - "description" => _("Description"), - "manager" => _("Manager"), - "base" => _("Base"), - "gosaUnitTag" => _("Administrative settings")) - )); - } + "plProvidedAcls" => array( + "c" => _("Country name"), + "description" => _("Description"), + "manager" => _("Manager"), + "base" => _("Base"), + "gosaUnitTag" => _("Administrative settings")) + )); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/admin/departments/class_dcObject.inc b/gosa-core/plugins/admin/departments/class_dcObject.inc index c4423d7fa..6e8abe616 100644 --- a/gosa-core/plugins/admin/departments/class_dcObject.inc +++ b/gosa-core/plugins/admin/departments/class_dcObject.inc @@ -22,78 +22,78 @@ class dcObject extends department { - /* attribute list for save action */ - var $attributes = array( "dc", "ou", "description","gosaUnitTag", "manager"); - var $objectclasses = array("top", "dcObject", "gosaDepartment"); - var $structuralOC = array("locality"); - var $type = "dcObject"; - 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", "dcObject", "gosaDepartment"); + var $structuralOC = array("locality"); + var $type = "dcObject"; + 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=dcObject))", $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=dcObject))", $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"), - "manager" => _("Manager"), - "base" => _("Base"), - "gosaUnitTag" => _("Administrative settings")) - )); - } + "plProvidedAcls" => array( + "dc" => _("Name"), + "description" => _("Description"), + "manager" => _("Manager"), + "base" => _("Base"), + "gosaUnitTag" => _("Administrative settings")) + )); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/admin/departments/class_localityGeneric.inc b/gosa-core/plugins/admin/departments/class_localityGeneric.inc index 9c435ee41..b829f00bb 100644 --- a/gosa-core/plugins/admin/departments/class_localityGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_localityGeneric.inc @@ -22,79 +22,79 @@ class locality extends department { - /* attribute list for save action */ - var $attributes = array("l", "description", "ou", "gosaUnitTag", "manager"); - var $objectclasses = array("top", "gosaDepartment"); - var $structuralOC = array("locality"); + /* attribute list for save action */ + var $attributes = array("l", "description", "ou", "gosaUnitTag", "manager"); + var $objectclasses = array("top", "gosaDepartment"); + var $structuralOC = array("locality"); - var $description= ""; - var $type = "locality"; - var $l = ""; - var $orig_l = ""; - var $namingAttr = "l"; + var $description= ""; + var $type = "locality"; + var $l = ""; + var $orig_l = ""; + var $namingAttr = "l"; - var $manager_enabled = FALSE; - var $manager_name =""; - var $manager =""; + var $manager_enabled = FALSE; + var $manager_name =""; + var $manager =""; - function check() - { - $message = plugin::check(); - - /* Check for presence of this department */ - $ldap= $this->config->get_ldap_link(); - $ldap->ls ("(&(l=".$this->l.")(objectClass=locality))", $this->base, array('dn')); - if ($this->orig_l == "new" && $ldap->count()){ - $message[]= msgPool::duplicated(_("Name")); - } elseif ($this->orig_dn != $this->dn && $ldap->count()){ - $message[]= msgPool::duplicated(_("Name")); - } + function check() + { + $message = plugin::check(); - /* All required fields are set? */ - if ($this->l == ""){ - $message[]= msgPool::required(_("Name")); - }elseif(tests::is_department_name_reserved($this->l,$this->base)){ - $message[]= msgPool::reserved(_("Name")); - }elseif(preg_match ('/[#+:=>\\\\\/]/', $this->l)){ - $message[]= msgPool::invalid(_("Name"), $this->l, "/[^#+:=>\\\\\/]/"); - } + /* Check for presence of this department */ + $ldap= $this->config->get_ldap_link(); + $ldap->ls ("(&(l=".$this->l.")(objectClass=locality))", $this->base, array('dn')); + if ($this->orig_l == "new" && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } elseif ($this->orig_dn != $this->dn && $ldap->count()){ + $message[]= msgPool::duplicated(_("Name")); + } - /* Check description */ - if ($this->description == ""){ - $message[]= msgPool::required(_("Description")); - } + /* All required fields are set? */ + if ($this->l == ""){ + $message[]= msgPool::required(_("Name")); + }elseif(tests::is_department_name_reserved($this->l,$this->base)){ + $message[]= msgPool::reserved(_("Name")); + }elseif(preg_match ('/[#+:=>\\\\\/]/', $this->l)){ + $message[]= msgPool::invalid(_("Name"), $this->l, "/[^#+:=>\\\\\/]/"); + } - /* 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 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(); + } - return($message); - } + return($message); + } - /* Return plugin informations for acl handling */ - static function plInfo() - { - return (array("plShortName" => _("Locality"), - "plDescription" => _("Locality"), - "plSelfModify" => FALSE, - "plPriority" => 3, - "plDepends" => array(), - "plSection" => array("administration"), - "plCategory" => array("department"), + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array("plShortName" => _("Locality"), + "plDescription" => _("Locality"), + "plSelfModify" => FALSE, + "plPriority" => 3, + "plDepends" => array(), + "plSection" => array("administration"), + "plCategory" => array("department"), - "plProvidedAcls" => array( - "l" => _("Location"), - "description" => _("Description"), - "manager" => _("Manager"), - "base" => _("Base"), - "gosaUnitTag" => _("Administrative settings")) - )); - } + "plProvidedAcls" => array( + "l" => _("Location"), + "description" => _("Description"), + "manager" => _("Manager"), + "base" => _("Base"), + "gosaUnitTag" => _("Administrative settings")) + )); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/admin/departments/class_organizationGeneric.inc b/gosa-core/plugins/admin/departments/class_organizationGeneric.inc index 7f55361f9..697178234 100644 --- a/gosa-core/plugins/admin/departments/class_organizationGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_organizationGeneric.inc @@ -22,119 +22,119 @@ class organization extends department { - /* attribute list for save action */ - var $attributes = array( "o", "ou", "description","userPassword","searchGuide", - "seeAlso","businessCategory","x121Address","registeredAddress","manager", - "destinationIndicator","preferredDeliveryMethod","telexNumber", - "telephoneNumber","internationaliSDNNumber","facsimileTelephoneNumber","street", - "postOfficeBox","postalCode", "postalAddress","physicalDeliveryOfficeName", - "st","l","teletexTerminalIdentifier","gosaUnitTag"); - - var $objectclasses = array("top", "gosaDepartment"); - var $structuralOC = array("organization"); - - /* Attributes - */ - var $st =""; - var $l =""; - var $description =""; - var $userPassword =""; - var $searchGuide =""; - var $seeAlso =""; - var $businessCategory =""; - var $x121Address =""; - var $registeredAddress =""; - var $destinationIndicator =""; - var $preferredDeliveryMethod =""; - var $telexNumber =""; - var $telephoneNumber =""; - var $internationaliSDNNumber =""; - var $facsimileTelephoneNumber =""; - var $street =""; - var $postOfficeBox =""; - var $postalCode =""; - var $postalAddress =""; - var $teletexTerminalIdentifier=""; - var $physicalDeliveryOfficeName=""; - - /* Naming attributes - */ - var $o =""; - var $type = "organization"; - var $orgi_o = ""; - var $namingAttr = "o"; - - var $manager_enabled = FALSE; - var $manager_name =""; - var $manager =""; - - function check() - { - $message = plugin::check(); - - /* Check for presence of this department */ - $ldap= $this->config->get_ldap_link(); - $ldap->ls ("(&(o=".$this->o.")(objectClass=organization))", $this->base, array('dn')); - if ($this->orig_o == "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->o == ""){ - $message[]= msgPool::required(_("Name")); - }elseif(tests::is_department_name_reserved($this->o,$this->base)){ - $message[]= msgPool::reserved(_("Name")); - }elseif(preg_match ('/[#+:=>\\\\\/]/', $this->o)){ - $message[]= msgPool::invalid(_("Name"), $this->o, "/[^#+:=>\\\\\/]/"); - } - - /* Check description */ - if ($this->description == ""){ - $message[]= msgPool::required(_("Description")); - } - - /* Check if we are allowed to create or move this object + /* attribute list for save action */ + var $attributes = array( "o", "ou", "description","userPassword","searchGuide", + "seeAlso","businessCategory","x121Address","registeredAddress","manager", + "destinationIndicator","preferredDeliveryMethod","telexNumber", + "telephoneNumber","internationaliSDNNumber","facsimileTelephoneNumber","street", + "postOfficeBox","postalCode", "postalAddress","physicalDeliveryOfficeName", + "st","l","teletexTerminalIdentifier","gosaUnitTag"); + + var $objectclasses = array("top", "gosaDepartment"); + var $structuralOC = array("organization"); + + /* Attributes + */ + var $st =""; + var $l =""; + var $description =""; + var $userPassword =""; + var $searchGuide =""; + var $seeAlso =""; + var $businessCategory =""; + var $x121Address =""; + var $registeredAddress =""; + var $destinationIndicator =""; + var $preferredDeliveryMethod =""; + var $telexNumber =""; + var $telephoneNumber =""; + var $internationaliSDNNumber =""; + var $facsimileTelephoneNumber =""; + var $street =""; + var $postOfficeBox =""; + var $postalCode =""; + var $postalAddress =""; + var $teletexTerminalIdentifier=""; + var $physicalDeliveryOfficeName=""; + + /* Naming attributes */ - 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(); + var $o =""; + var $type = "organization"; + var $orgi_o = ""; + var $namingAttr = "o"; + + var $manager_enabled = FALSE; + var $manager_name =""; + var $manager =""; + + function check() + { + $message = plugin::check(); + + /* Check for presence of this department */ + $ldap= $this->config->get_ldap_link(); + $ldap->ls ("(&(o=".$this->o.")(objectClass=organization))", $this->base, array('dn')); + if ($this->orig_o == "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->o == ""){ + $message[]= msgPool::required(_("Name")); + }elseif(tests::is_department_name_reserved($this->o,$this->base)){ + $message[]= msgPool::reserved(_("Name")); + }elseif(preg_match ('/[#+:=>\\\\\/]/', $this->o)){ + $message[]= msgPool::invalid(_("Name"), $this->o, "/[^#+:=>\\\\\/]/"); + } + + /* 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(); + } + + return($message); } - return($message); - } - - - /* Return plugin informations for acl handling */ - static function plInfo() - { - return (array("plShortName" => _("Organization"), - "plDescription" => _("Organization"), - "plSelfModify" => FALSE, - "plPriority" => 1, - "plDepends" => array(), - "plSection" => array("administration"), - "plCategory" => array("department"), - - "plProvidedAcls" => array( - "o" => _("Organization name"), - "description" => _("Description"), - "businessCategory" => _("Category"), - "base" => _("Base"), - - "manager" => _("Manager"), - - "st" => _("State"), - "l" => _("Location"), - "postalAddress" => _("Postal address"), - "telephoneNumber" => _("Phone number"), - "facsimileTelephoneNumber"=> _("Fax"), - - "gosaUnitTag" => _("Administrative settings")) - )); - } + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array("plShortName" => _("Organization"), + "plDescription" => _("Organization"), + "plSelfModify" => FALSE, + "plPriority" => 1, + "plDepends" => array(), + "plSection" => array("administration"), + "plCategory" => array("department"), + + "plProvidedAcls" => array( + "o" => _("Organization name"), + "description" => _("Description"), + "businessCategory" => _("Category"), + "base" => _("Base"), + + "manager" => _("Manager"), + + "st" => _("State"), + "l" => _("Location"), + "postalAddress" => _("Postal address"), + "telephoneNumber" => _("Phone number"), + "facsimileTelephoneNumber"=> _("Fax"), + + "gosaUnitTag" => _("Administrative settings")) + )); + } } -- 2.30.2