From 43c14cd0cecdcde5186c32671a86d6feb1838b2f Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 21 Nov 2005 09:11:43 +0000 Subject: [PATCH] Added up down buttons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1992 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/groups/class_groupApplication.inc | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) 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'])){ -- 2.30.2