From 815cfe688d5fa93bf4ea446f0f4bca683c2efae3 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 9 Jan 2008 17:49:16 +0000 Subject: [PATCH] Updated print_red messages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8277 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/getvcard.php | 4 ++-- gosa-core/html/index.php | 14 +++++++------- gosa-core/html/main.php | 4 ++-- gosa-core/include/functions.inc | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gosa-core/html/getvcard.php b/gosa-core/html/getvcard.php index 7c0d01477..ebc751143 100644 --- a/gosa-core/html/getvcard.php +++ b/gosa-core/html/getvcard.php @@ -33,8 +33,8 @@ if (!session::is_set('ui')){ /* Uid parameter set? */ if (!isset($_GET['dn']) || $_GET['dn'] == ""){ - print_red (_("Error: getcvard.php needs a parameter to export a vcard!")); - exit; + msg_dialog::display(_("Internal error"), _("Missing parameters!"), ERROR_DIALOG); + display_error_page(); } header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); diff --git a/gosa-core/html/index.php b/gosa-core/html/index.php index 4cd21afb7..ee95d68af 100644 --- a/gosa-core/html/index.php +++ b/gosa-core/html/index.php @@ -202,7 +202,7 @@ if ($config->data['MAIN']['FORCESSL'] == 'true' && $ssl != ''){ $htaccess_authenticated= FALSE; if (isset($config->data['MAIN']['HTACCESS_AUTH']) && preg_match('/^(yes|true)$/i', $config->data['MAIN']['HTACCESS_AUTH'])){ if (!isset($_SERVER['REMOTE_USER'])){ - print_red(_("There is a problem with the authentication setup. Please inform your system administrator.")); + msg_dialog::display(_("Configuration error"), _("There is a problem with the authentication setup!"), ERROR_DIALOG); display_error_page(); } @@ -210,11 +210,11 @@ if (isset($config->data['MAIN']['HTACCESS_AUTH']) && preg_match('/^(yes|true)$/i $username= $tmp['username']; $server= $tmp['server']; if ($username == ""){ - print_red(_("Cannot find a valid user for the current authentication setup.")); + msg_dialog::display(_("Error"), _("Cannot find a valid user for the current authentication setup!"), ERROR_DIALOG); display_error_page(); } if ($server == ""){ - print_red(_("User information is not uniq accross the configured directories. Cannot authenticated.")); + msg_dialog::display(_("Error"), _("User information is not uniq accross the configured LDAP trees!"), ERROR_DIALOG); display_error_page(); } @@ -240,7 +240,7 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces /* Admin-logon and verify */ $ldap = $config->get_ldap_link(); if (is_null($ldap) || (is_int($ldap) && $ldap == 0)){ - print_red (_("Can't bind to LDAP. Please contact the system administrator.")); + msg_dialog::display(_("LDAP error"), _("Can't bind to LDAP. Please contact the system administrator."), ERROR_DIALOG); displayLogin(); exit(); } @@ -254,7 +254,7 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces $tls = (isset($config->current['TLS']) && $config->current['TLS'] == "true"); if(!count($ldap->get_objectclasses())){ - print_red(_("GOsa cannot retrieve information about the installed schema files. Please make sure, that this is possible.")); + msg_dialog::display(_("LDAP error"), _("Cannot detect information about the installed LDAP schema!"), ERROR_DIALOG); displayLogin(); exit() ; }else{ @@ -267,7 +267,7 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces $checkarr = array(); foreach($str as $tr){ if(isset($tr['IS_MUST_HAVE']) && !$tr['STATUS']){ - print_red($tr['MSG']."
"._("Your ldap setup contains old schema definitions. Please re-run the setup.")); + msg_dialog::display(_("LDAP error"), _("Your ldap setup contains old schema definitions:")."

".$tr['MSG']."", ERROR_DIALOG); displayLogin(); exit(); } @@ -303,7 +303,7 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces if ($htaccess_authenticated){ $ui= ldap_login_user_htaccess($username); if ($ui === NULL || !$ui){ - print_red(_("Authentication via htaccess not possible. Unable to retrieve user information.")); + msg_dialog::display(_("Authentication error"), _("Cannot retrieve user information for htaccess authentication!"), ERROR_DIALOG); display_error_page(); } } else { diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index 33da67448..56f5aa897 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -201,7 +201,7 @@ eval_sizelimit(); /* Check for memory */ if (function_exists("memory_get_usage")){ if (memory_get_usage() > (to_byte(ini_get('memory_limit')) - 2048000 )){ - print_red(_("Warning: memory is getting low - please increase the memory_limit!")); + msg_dialog::display(_("Configuration warning"), _("Running out of memory!"), WARNING_DIALOG); } } @@ -340,7 +340,7 @@ if((isset($config->data['MAIN']['ACCOUNT_EXPIRATION'])) && if ($expired == 2){ new log("security","gosa","",array(),"password for user \"$ui->username\" is about to expire") ; - print_red(_("Your password is about to expire, please change your password")); + msg_dialog::display(_("Password reminder"), _("Your password is about to expire, please change your password!"), INFO_DIALOG); } } diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 5c4af1679..c55e56644 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2416,17 +2416,17 @@ function check_schema($cfg,$rfc2307bis = FALSE) if(!isset($objectclasses[$name])){ $checks[$name]['STATUS'] = FALSE; if($value['IS_MUST_HAVE']){ - $checks[$name]['MSG'] = sprintf(_("The required objectClass '%s' is not present in your schema setup"),$class); + $checks[$name]['MSG'] = sprintf(_("Missing required object class '%s'!"),$class); }else{ - $checks[$name]['MSG'] = sprintf(_("The optional objectClass '%s' is not present in your schema setup"),$class); + $checks[$name]['MSG'] = sprintf(_("Missing optional object class '%s'!"),$class); } }elseif(!check_schema_version($objectclasses[$name],$value['REQUIRED_VERSION'])){ $checks[$name]['STATUS'] = FALSE; if($value['IS_MUST_HAVE']){ - $checks[$name]['MSG'] = sprintf(_("The required objectclass '%s' does not have version %s"), $class, $value['REQUIRED_VERSION']); + $checks[$name]['MSG'] = sprintf(_("Version mismatch for required object class '%s' (!=%s)!"), $class, $value['REQUIRED_VERSION']); }else{ - $checks[$name]['MSG'] = sprintf(_("The optional objectclass '%s' does not have version %s"), $class, $value['REQUIRED_VERSION']); + $checks[$name]['MSG'] = sprintf(_("Version mismatch for optional object class '%s' (!=%s)!"), $class, $value['REQUIRED_VERSION']); } }else{ $checks[$name]['STATUS'] = TRUE; -- 2.30.2