summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d21df4b)
raw | patch | inline | side by side (parent: d21df4b)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Mar 2008 10:48:43 +0000 (10:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Mar 2008 10:48:43 +0000 (10:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9431 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/utils/class_msgPool.inc | patch | blob | history |
index cf25cd10f2b1cdb33f9fa95d463874dfd2b28c39..a44b2496c070d51af9ecaea3e7d97ca18f87ce8f 100644 (file)
class msgPool
{
+ public static function permDelete($name= "")
+ {
+ if ($name == "") {
+ return (_("You have no permission to delete this object!"));
+ }
+
+ if (!is_array($name)){
+ return (_("You have no permission to delete the object:")."<br><br><i>$name</i>");
+ }
+
+ msgPool::buildList($name);
+ if (count($name) == 1){
+ return (_("You have no permission to delete the object:")."<br>".msgPool::buildList($name));
+ }
+
+ return (_("You have no permission to delete these objects:")."<br>".msgPool::buildList($name));
+ }
+
+
+ public static function permCreate($name= "")
+ {
+ if ($name == "") {
+ return (_("You have no permission to create this object!"));
+ }
+
+ if (!is_array($name)){
+ return (_("You have no permission to create the object:")."<br><br><i>$name</i>");
+ }
+
+ if (count($name) == 1){
+ return (_("You have no permission to create the object:")."<br>".msgPool::buildList($name));
+ }
+
+ return (_("You have no permission to create these objects:")."<br>".msgPool::buildList($name));
+ }
+
+
+ public static function permModify($name= "")
+ {
+ if ($name == "") {
+ return (_("You have no permission to modify this object!"));
+ }
+
+ if (!is_array($name)){
+ return (_("You have no permission to modify the object:")."<br><br><i>$name</i>");
+ }
+
+ if (count($name) == 1){
+ return (_("You have no permission to modify the object:")."<br>".msgPool::buildList($name));
+ }
+
+ return (_("You have no permission to modify these objects:")."<br>".msgPool::buildList($name));
+ }
+
+
+ public static function permMove($name= "")
+ {
+ if ($name == "") {
+ return (_("You have no permission to move this object!"));
+ }
+
+ if (!is_array($name)){
+ return (_("You have no permission to move the object:")."<br><br><i>$name</i>");
+ }
+
+ if (count($name) == 1){
+ return (_("You have no permission to move the object:")."<br>".msgPool::buildList($name));
+ }
+
+ return (_("You have no permission to move these objects:")."<br>".msgPool::buildList($name));
+ }
+
+
public static function dbconnect($name, $error= "", $dbinfo= "")
{
if ($error != ""){
return $what == "" ? sprintf(_("Edit..."): sprintf(_("Edit %s..."), $what));
}
+
+ public static function buildList($data)
+ {
+ $objects= "";
+ foreach ($name as $key => $value){
+ if (is_numeric($key)){
+ $objects.= "<br>\n<i>$value</i>";
+ } else {
+ $objects.= "<br>\n$key (<i>$value</i>)";
+ }
+ }
+ }
+
+
}