From: hickert Date: Mon, 21 Nov 2005 09:11:43 +0000 (+0000) Subject: Added up down buttons X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=43c14cd0cecdcde5186c32671a86d6feb1838b2f;p=gosa.git Added up down buttons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1992 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index f75d80d63..cd62e289e 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -118,8 +118,28 @@ class appgroup extends plugin } } - function getOneDown($prio){ - return($prio); + function getOneDown($appl){ + $prio = $this->gosaMemberApplication[$appl]['Pri']; + $prios = array(); + $next = 10000; + $key_use = false; + foreach($this->gosaMemberApplication as $key => $app){ + if($app['Cat'] != $this->gosaMemberApplication[$appl]['Cat']) continue; + + + + if($app['Pri']> $prio){ + if($app['Pri'] < $next){ + $next = $app['Pri']; + $key_use = $key; + } + } + } + + if($next != 0){ + $this->gosaMemberApplication[$appl]['Pri']= $next; + $this->gosaMemberApplication[$key_use]['Pri']= $prio; + } } function getNextFree($prio,$cat) @@ -468,8 +488,6 @@ class appgroup extends plugin plugin::save(); /* Copy members */ - - print_a($this->attrs["gosaMemberApplication"]); $this->attrs["gosaMemberApplication"]= array(); foreach ($this->gosaMemberApplication as $val){ if(!preg_match("/__SEPARATOR__/i",$val['App'])){