From 7c2aaa72ec6df2eeee6bf42503a71f788a43937d Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 12 Mar 2008 13:36:08 +0000 Subject: [PATCH] msgPool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9714 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/devices/class_deviceGeneric.inc | 12 ++++++------ .../goto/admin/devices/class_deviceManagement.inc | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc index eed97d25d..6ce15fb9c 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc @@ -84,21 +84,21 @@ class deviceGeneric extends plugin $message = plugin::check(); if(empty($this->cn)||(preg_match("/[^a-z0-9]/i",$this->cn))){ - $message[]=_("Please specify a valid name. Only 0-9 a-Z is allowed."); + $message[]= msgPool::invalid(_("Name"),$this->cn,"/^[a-z0-9]*$/i"); } if(preg_match("/[^a-z0-9!\"?.,;:-_\(\) ]/i",$this->description)){ - $message[]=_("Invalid character in description. Please specify a valid description."); + $message[]= msgPool::invalid(_("Description"),$this->cn,"/^[a-z0-9!\"?.,;:-_\(\) ]*$/i"); } /* Skip serial check if vendor and product id are given */ if(preg_match("/^\s+$/i",$this->dev_id)){ - $message[]=_("Please specify a valid iSerial."); + $message[]= msgPool::invalid(_("iSerial"),"","01234"); } if(empty($this->serial) || !$this->is_2byteHex($this->serial)){ - $message[]=_("Please specify a valid vendor ID. (2 byte hex like '0xFFFF')"); + $message[]= msgPool::invalid(_("Serial"),"","","0x1234"); } if(empty($this->vendor) || !$this->is_2byteHex($this->vendor)){ - $message[]=_("Please specify a valid product ID. (2 byte hex like '0xFFFF')"); + $message[]= msgPool::invalid(_("Vender ID"),"","","0x1234"); } /* Check if entry already exists */ @@ -106,7 +106,7 @@ class deviceGeneric extends plugin $ldap = $this->config->get_ldap_link(); $ldap->search("(&(objectClass=gotoDevice)(cn=".$this->cn."*))",array("cn")); if($ldap->count()){ - $message[]=_("An Entry with this name already exists."); + $message[]= msgPool::duplicate(_("Name")); } } diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index 6d3a29420..55d405e5d 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -274,7 +274,7 @@ class deviceManagement extends plugin } else { /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ - print_red (_("You are not allowed to delete this device type!")); + print_red (msgPool::permDelete()); new log("security","devices/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ @@ -329,7 +329,7 @@ class deviceManagement extends plugin /* Obviously the user isn't allowed to delete. Show message and clean session. */ - print_red (_("You are not allowed to delete this device!")); + print_red (msgPool::permDelete()); } } @@ -358,7 +358,7 @@ class deviceManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ - print_red (_("You are not allowed to delete this device!")); + print_red (msgPool::permDelete()); new log("security","devices/".get_class($this),$dn,array(),"Tried to trick deletion."); } -- 2.30.2