From e99b0da1fd51f10ff4164991d853bd73a8108126 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 12 Mar 2008 17:14:25 +0000 Subject: [PATCH] Updated msgPools git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9722 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../applications/class_applicationGeneric.inc | 29 ++++++------------- .../goto/admin/systems/goto/workstation.tpl | 10 ++++--- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index 198d1114a..dffce7a49 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -261,25 +261,14 @@ class application extends plugin this application is still in use. */ if(count($found)){ - $objs = ""; - $cnt = 3; - for($i = 0 ; $i < $cnt ; $i++ ){ - if(isset($found[$i])){ - $objs .= " ".$found[$i].","; - } - } - if(count($found) > $cnt){ - $objs .= "... "; - } - $objs = trim($objs,", "); - print_red(sprintf(_("Can not remove application, it is still in use by these objects: %s."),$objs)); + msg_dialog::display(_("Error"), sprintf(_("Cannot remove application - it is still in use by these objects: %s"), "
".msgPool::buildList($found)), ERROR_DIALOG); return(FALSE); } $ldap->rmDir($this->dn); new log("remove","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class())); + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()), ERROR_DIALOG); } /* Optionally execute a command after we're done */ @@ -293,7 +282,7 @@ class application extends plugin unset($og->member[$this->dn]); $og->save (); if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()), ERROR_DIALOG); } } } @@ -344,7 +333,7 @@ class application extends plugin if (isset($_FILES['picture_file']['name']) && $_FILES['picture_file']['name'] != ""){ if (!is_uploaded_file($_FILES['picture_file']['tmp_name'])) { - print_red (_("The specified picture has not been uploaded correctly.")); + msg_dialog::display(_("Error"), msgPool::incorrectUpload(), ERROR_DIALOG); } if (!function_exists("imagick_blob2image")){ @@ -376,21 +365,21 @@ class application extends plugin /* Load the new uploaded Photo */ if(!$handle = imagick_ReadImage($_FILES['picture_file']['tmp_name'])){ - print_red(_("Can't access uploaded image.")); + msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("no read permission")), ERROR_DIALOG); } /* Resizing image to 147x200 and blur */ if(!imagick_resize($handle,48,48,IMAGICK_FILTER_GAUSSIAN,0)){ - print_red(_("Uploaded image could not be resized, possilby the image magick extension is missing.")); + msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("cannot resize image")), ERROR_DIALOG); } /* Converting image to JPEG */ if(!imagick_convert($handle,"PNG")) { - print_red(_("Could not convert image to png, possilby the image magick extension is missing.")); + msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("cannot convert image")), ERROR_DIALOG); } if(!imagick_writeimage($handle,$_FILES['picture_file']['tmp_name'])){ - print_red(sprintf(_("Could not save uploaded image to %s."),$_FILES['picture_file']['tmp_name'])); + msg_dialog::display(_("Error"), msgPool::incorrectUpload(sprintf(_("cannot save image to '%s'"), $_FILES['picture_file']['tmp_name'])), ERROR_DIALOG); } imagick_free($handle); @@ -517,7 +506,7 @@ class application extends plugin $this->handle_post_events("add"); } if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()), ERROR_DIALOG); } } diff --git a/gosa-plugins/goto/admin/systems/goto/workstation.tpl b/gosa-plugins/goto/admin/systems/goto/workstation.tpl index 1ea980e76..d9b31dd27 100644 --- a/gosa-plugins/goto/admin/systems/goto/workstation.tpl +++ b/gosa-plugins/goto/admin/systems/goto/workstation.tpl @@ -134,9 +134,6 @@ {/if} +
-{if $currently_installing} - {t}System installation in progress, the FAI state cannot be changed right now.{/t} -{else} {render acl=$FAIstateACL} +{if $currently_installing} +{render acl=r} + +{/render} +{else} {render acl=$FAIstateACL} {/render} -
{/if} -- 2.30.2