From 143b9c875338ccec9585cff03ca0d3f3d657df96 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 21 Feb 2008 07:53:16 +0000 Subject: [PATCH] gosa-core is now free of print_red git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9000 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_hostActionQueue.inc | 1 - gosa-core/plugins/admin/acl/class_aclManagement.inc | 12 ++++++------ .../admin/departments/class_departmentManagement.inc | 6 +++--- .../plugins/admin/departments/tabs_department.inc | 2 +- .../plugins/admin/groups/class_groupGeneric.inc | 12 ++++++------ .../plugins/admin/groups/class_groupManagement.inc | 6 +++--- gosa-core/plugins/admin/ogroups/class_ogroup.inc | 2 +- .../plugins/admin/ogroups/class_ogroupManagement.inc | 6 +++--- 8 files changed, 23 insertions(+), 24 deletions(-) diff --git a/gosa-core/include/class_hostActionQueue.inc b/gosa-core/include/class_hostActionQueue.inc index c21ebfd76..e6eacf10e 100644 --- a/gosa-core/include/class_hostActionQueue.inc +++ b/gosa-core/include/class_hostActionQueue.inc @@ -139,7 +139,6 @@ class hostActionQueue { $parts = split(" ",$row); if(count($parts) != 10){ - print_red(_("Entry broken, skipped.")); msg_dialog::display(_("GOsa infrastructure"), _("Cannot read broken entry - skipped!"), WARNING_DIALOG); }else{ diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 299cbd2e8..75721a269 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -157,7 +157,7 @@ class aclManagement extends plugin $this->acltabs= new aclroletab($this->config, NULL,$this->dn); $this->acltabs->set_acl_base($this->DivListACL->selectedBase); }else{ - msg_dialog::display(_("Permission error"), _("You have no permissions to create a new role!"), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), _("You have no permission to create a new role!"), ERROR_DIALOG); } } @@ -194,7 +194,7 @@ class aclManagement extends plugin /* Set ACL and move DN to the headline */ session::set('objectinfo',$this->dn); }else{ - msg_dialog::display(_("Permission error"), _("You have no permissions to edit this ACL!"), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), _("You have no permission to edit this ACL!"), ERROR_DIALOG); } } @@ -247,7 +247,7 @@ class aclManagement extends plugin /* Obviously the acl isn't allowed to delete. Show message and clean session. */ - msg_dialog::display(_("Permission error"), _("You have no permissions to delete this ACL!"), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); } } @@ -271,7 +271,7 @@ class aclManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ - msg_dialog::display(_("Permission error"), _("You have no permissions to delete this role!"), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); if(isset($this->ui->uid)){ new log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion."); @@ -310,7 +310,7 @@ class aclManagement extends plugin /* Obviously the acl isn't allowed to delete. Show message and clean session. */ - msg_dialog::display(_("Permission error"), _("You have no permissions to delete this ACL!"), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); } } @@ -334,7 +334,7 @@ class aclManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ - msg_dialog::display(_("Permission error"), _("You have no permissions to delete this ACL!"), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); if(isset($this->ui->uid)){ new log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion."); diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index adb1bed53..7bf6b5959 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -203,7 +203,7 @@ class departmentManagement extends plugin $this->deptabs->delete (); $this->deptabs = NULL; } else { - print_red (_("You have no permission to remove this department.")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), WARNING_DIALOG); } /* Remove lock file after successfull deletion */ del_lock ($dn); @@ -251,7 +251,7 @@ class departmentManagement extends plugin return ($display); } }else{ - print_red (_("You have no permission to remove this department.")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), WARNING_DIALOG); } } @@ -270,7 +270,7 @@ class departmentManagement extends plugin if(preg_match("/d/",$acl)){ $this->remove_from_parent(); } else { - print_red (_("You have no permission to remove this department.")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), WARNING_DIALOG); } } diff --git a/gosa-core/plugins/admin/departments/tabs_department.inc b/gosa-core/plugins/admin/departments/tabs_department.inc index cf04bd29b..796bdffe6 100644 --- a/gosa-core/plugins/admin/departments/tabs_department.inc +++ b/gosa-core/plugins/admin/departments/tabs_department.inc @@ -31,7 +31,7 @@ class deptabs extends tabs $cnt1 = count(split(",",$this->dn)); $cnt2 = count(split(",",$new_dn)); if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ - print_red(_("Try to move tree failed. Destination tree is subtree of source tree.")); + msg_dialog::display(_("LDAP error"), _("Moving LDAP tree failed: destination tree is a subtree of the source!"), ERROR_DIALOG); }else{ /* Prepare to be moved */ $baseobject->recursive_move($this->dn, $new_dn); diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index 24c16c7bc..8f2ff3192 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -134,7 +134,7 @@ class group extends plugin $this->ridBase= $this->config->current['RIDBASE']; $this->SID= $this->config->current['SID']; } else { - print_red(_("Can't find this groups SID in LDAP or in your configuration file!")); + msg_dialog::display(_("Configuration error"), _("Cannot find group SID in your configuration!"), ERROR_DIALOG); } } @@ -528,8 +528,8 @@ class group extends plugin } /* If more than max users are found, display a message to warn the user */ - if(($i == $MaxUser)){ - print_red(sprintf(_("Your search method returned more than '%s' users, only '%s' users are shown.") , $MaxUser,$MaxUser)); + if($i == $MaxUser){ + msg_dialog::display(_("Configuration error"), sprintf(_("Search returned too many results. Not displaying more than %s entries."), $MaxUser), ERROR_DIALOG); } /* Sort lists */ @@ -708,12 +708,12 @@ class group extends plugin if(isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'])){ $this->SID = $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID']; }else{ - print_red(sprintf(_("No configured SID found for '%s'."),$this->sambaDomainName)); + msg_dialog::display(_("Error"), sprintf(_("Cannot find any SID for '%s'!"), $this->sambaDomainName), ERROR_DIALOG); } if(isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE'])){ $this->ridBase= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE']; }else{ - print_red(sprintf(_("No configured RIDBASE found for '%s'."),$this->sambaDomainName)); + msg_dialog::display(_("Error"), sprintf(_("Cannot find any RIDBASE for '%s'!"), $this->sambaDomainName), ERROR_DIALOG); } $this->attrs['objectClass'][]= 'sambaGroupMapping'; @@ -941,7 +941,7 @@ class group extends plugin /* Check if id reached maximum */ if ($id >= pow(2,32)){ - print_red(_("Too many users, can't allocate a free ID!")); + msg_dialog::display(_("Error"), _("Cannot allocate a free ID!"), ERROR_DIALOG); exit; } } diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 868c1e7aa..e8e19f27f 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -331,7 +331,7 @@ class groupManagement 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 group!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ @@ -384,7 +384,7 @@ class groupManagement extends plugin } else { /* Obviously the user isn't allowed to delete. Show message and clean session. */ - print_red (_("You are not allowed to delete this group!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); } } @@ -415,7 +415,7 @@ class groupManagement 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 group!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion."); } diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 56f962809..ca2ef6969 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -147,7 +147,7 @@ class ogroup extends plugin } } if($skipped){ - print_red(_("You can only have terminals or workstations in one group, but not both.")); + msg_dialog::display(_("Information"), _("You cannot combine terminals and workstations in one object group!"), INFO_DIALOG); } $this->reload(); } diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index f7f7caec8..39c9ea8ba 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -212,7 +212,7 @@ class ogroupManagement 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 object group!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), INFO_DIALOG); new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ @@ -264,7 +264,7 @@ class ogroupManagement extends plugin /* Obviously the user isn't allowed to delete. Show message and clean session. */ - print_red (_("You are not allowed to delete this object group!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), INFO_DIALOG); } } @@ -291,7 +291,7 @@ class ogroupManagement 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 object group!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), INFO_DIALOG); new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion."); } -- 2.30.2