index 5bd2ab145920e0c7a1dab92f73aba73ad8c48b88..677ebb193c86fbe16d749bfa387c3804ab54980c 100644 (file)
<?php
/*
- * This code is part of GOsa (https://gosa.gonicus.de)
- * Copyright (C) 2003 Cajus Pollmeier
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
define('DES3_CBC_SHA1',16);
/* Define globals for revision comparing */
-$svn_path = '$HeadURL$';
-$svn_revision = '$Revision$';
+$svn_path = '$HeadURL: https://oss.gonicus.de/repositories/gosa/trunk/gosa-core/include/functions.inc $';
+$svn_revision = '$Revision: 9246 $';
/* Include required files */
require_once("class_location.inc");
/* Look for entry or realm */
$ldap= $config->get_ldap_link();
if (!preg_match("/Success/i", $ldap->error)){
- msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
+ msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), FATAL_ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
echo "<body>".session::get('errors')."</body></html>";
$ldap->search("(&(objectClass=gosaAccount)(uid=$username))", array("uid"));
/* Found no uniq match? Strange, because we did above... */
if ($ldap->count() != 1) {
- msg_dialog::display(_("LDAP error"), _("Username / UID is not unique inside the LDAP tree. Please contact your Administrator."), ERROR_DIALOG);
+ msg_dialog::display(_("LDAP error"), _("Username / UID is not unique inside the LDAP tree. Please contact your Administrator."), FATAL_ERROR_DIALOG);
return (NULL);
}
$attrs= $ldap->fetch();
/* look through the entire ldap */
$ldap = $config->get_ldap_link();
if (!preg_match("/Success/i", $ldap->error)){
- msg_dialog::display(_("LDAP error"), sprintf(_("User login failed.")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
+ msg_dialog::display(_("LDAP error"), sprintf(_("User login failed.")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), FATAL_ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
echo "<body>".session::get('errors')."</body></html>";
/* found more than one matching id */
default:
- msg_dialog::display(_("Internal error"), _("Username / UID is not unique inside the LDAP tree. Please contact your Administrator."), ERROR_DIALOG);
+ msg_dialog::display(_("Internal error"), _("Username / UID is not unique inside the LDAP tree. Please contact your Administrator."), FATAL_ERROR_DIALOG);
return (NULL);
}
/* Assemble the message array to a plain string */
foreach ($message as $error){
- if ($complete == ""){
- $complete= $error;
- } else {
- $complete= "$error<br>$complete";
- }
+ msg_dialog::display(_("Error"), $error, ERROR_DIALOG);
}
-
- /* Fill ERROR variable with nice error dialog */
- msg_dialog::display(_("Error"), $complete, ERROR_DIALOG);
}