From: cajus Date: Mon, 3 Mar 2008 14:18:29 +0000 (+0000) Subject: Moved X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=699c622b21e7e362333dfe455fc12f7e9f3e4025;p=gosa.git Moved git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9247 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_msgPool.inc b/gosa-core/include/class_msgPool.inc deleted file mode 100644 index e7e6d7817..000000000 --- a/gosa-core/include/class_msgPool.inc +++ /dev/null @@ -1,85 +0,0 @@ -
"._("Example:")." ".$example; - } - - /* If validChars are posted, take data and paint all invalid - characters... */ - if ($regex) { - $result= ""; - $mismatch= ""; - foreach (str_split($data) as $currentChar){ - if (preg_match("$regex", $currentChar)){ - $result.= $currentChar; - } else { - $result.= "".htmlentities($currentChar).""; - $mismatch.= $currentChar; - } - } - - return sprintf(_("The Field '%s' contains invalid characters"), $name).". ". - (strlen($mismatch)==1?sprintf(_("'%s' is not allowed:"), htmlentities($mismatch)):sprintf(_("'%s' are not allowed."), htmlentities($mismatch))). - "

\"$result\"$example"; - } else { - return sprintf(_("The Field '%s' contains invalid characters"), $name)."!$example"; - } - } - -} diff --git a/gosa-core/include/utils/class_msgPool.inc b/gosa-core/include/utils/class_msgPool.inc new file mode 100644 index 000000000..e7e6d7817 --- /dev/null +++ b/gosa-core/include/utils/class_msgPool.inc @@ -0,0 +1,85 @@ +
"._("Example:")." ".$example; + } + + /* If validChars are posted, take data and paint all invalid + characters... */ + if ($regex) { + $result= ""; + $mismatch= ""; + foreach (str_split($data) as $currentChar){ + if (preg_match("$regex", $currentChar)){ + $result.= $currentChar; + } else { + $result.= "".htmlentities($currentChar).""; + $mismatch.= $currentChar; + } + } + + return sprintf(_("The Field '%s' contains invalid characters"), $name).". ". + (strlen($mismatch)==1?sprintf(_("'%s' is not allowed:"), htmlentities($mismatch)):sprintf(_("'%s' are not allowed."), htmlentities($mismatch))). + "

\"$result\"$example"; + } else { + return sprintf(_("The Field '%s' contains invalid characters"), $name)."!$example"; + } + } + +}