Code

Added base check
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Feb 2010 10:14:16 +0000 (10:14 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Feb 2010 10:14:16 +0000 (10:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15532 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc

index 37970b76e55426a91a2a451ccd5e0070cc2e02d1..bd7531c9243d46e94037cf6bfe465215e918b4bb 100644 (file)
@@ -734,6 +734,11 @@ class printgeneric extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();
+    }
+
     /* must: cn */
     if(($this->BelongsTo == "Printer") && !tests::is_dns_name($this->cn)){
       $message[]= msgPool::invalid(_("Name"));
index 4737b7fde59704be187386746f8f7f112b5a9645..7273fada3a24c4fe9ed2417e21e6114776fccc52 100644 (file)
@@ -428,6 +428,11 @@ class termgeneric extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();
+    }
+
     /* Check if given name is a valid host/dns name */
     if(!tests::is_dns_name($this->cn) ){
       $message[] = msgPool::invalid(_("Name"));
index 08d898d06a0b329f04f8a8d73649c2b92481e1ae..9ade8d06dc8522a27001915d7db2d46b99ebd05e 100644 (file)
@@ -442,6 +442,11 @@ class workgeneric extends plugin
       $message[] = msgPool::invalid(_("Name"));
     }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();
+    }
+
     if ($this->orig_dn != $this->dn){
       $ldap= $this->config->get_ldap_link();
       $ldap->cd ($this->base);