summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 248743d)
raw | patch | inline | side by side (parent: 248743d)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 8 Mar 2008 15:21:51 +0000 (15:21 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 8 Mar 2008 15:21:51 +0000 (15:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9465 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history | |
gosa-core/include/utils/class_msgPool.inc | patch | blob | history |
index c01428d42f2047bd6a24f022599bd885ec7f9e59..af6fec7a36d80fa98a1613ad391b14f8929a605a 100644 (file)
return ($error);
}
+
+ function success()
+ {
+ return (preg_match('/Success/i', $this->error));
+ }
+
+
function get_error()
{
if ($this->error == 'Success'){
index 0286f95919b17b46dcfe21596486b8cf00f4a3e0..7b55aee9fbcb0152f4fe5214a919b9953b45b75d 100644 (file)
<?php
+define ("LDAP_READ", 1);
+define ("LDAP_ADD", 2);
+define ("LDAP_MOD", 3);
+define ("LDAP_DEL", 4);
+define ("LDAP_SEARCH", 5);
+define ("LDAP_AUTH", 6);
class msgPool
{
public static function toobig($name, $min= "")
{
if ($min == ""){
- return (sprintf(_("Value for '%s' is too big!"), $name));
+ return (sprintf(_("Value for '%s' is too large!"), $name));
} else {
return (sprintf(_("'%s' must be smaller than %d!"), $name, $min));
}
}
- public static function bigger($name1, $name2)
- {
- return (sprintf(_("'%s' should be bigger than '%s'!"), $name1, $name2));
- }
-
-
- public static function smaller($name1, $name2)
- {
- return (sprintf(_("'%s' should be smaller than '%s'!"), $name1, $name2));
- }
-
-
public static function depends($name1, $name2)
{
return (sprintf(_("'%s' depends on '%s' - please provide both values!"), $name1, $name2));
return array( _("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday"));
}
+
+ public static function ldaperror($error, $dn= "", $type= 0, $plugin= "")
+ {
+ /* Assign headline depending on type */
+ $typemap= array(1 => _("read operation"), _("add operation"), _("modify operation"),
+ _("delete operation"), _("search operation"), _("authentication"));
+
+ if (isset($typemap[$type])){
+ $headline= sprintf(_("LDAP %s failed!"), $typemap[$type]);
+ } else {
+ $headline= _("LDAP operation failed!");
+ }
+
+ /* Fill DN information */
+ if ($dn != ""){
+ $dn_info= "<br><br><i>"._("Object").":</i> ".LDAP::fix($dn);
+ }
+
+ return $headline.$dn_info."<br><br><i>"._("Error").":</i> ".$error;
+ }
+
+
}
+
+?>