summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1135d6c)
raw | patch | inline | side by side (parent: 1135d6c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Dec 2005 12:08:03 +0000 (12:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Dec 2005 12:08:03 +0000 (12:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2254 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupApplication.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index 385004292505a6e3d1e6a335937ecc160acd91d7..59fb4d7ca1c03cb6b995207063ffc9162ca682e3 100644 (file)
$this->gosaMemberApplication[$cat] =$tmp;
}
- function AddSeperator()
+ function AddSeperator($id)
{
+ $found = false;
+ $cat = "";
+ $tmp = array();
+ foreach($this->gosaMemberApplication[$this->curCatDir] as $appID => $app){
+ $tmp[] = $app;
+ if(($app['App'] == $id)&&(!$found)){
+ $cnt = count($this->gosaMemberApplication[$this->curCatDir]);
+ $tmp[] = array("App" => "__SEPARATOR__".($cnt+1));
+ $found = true;
+ }
+ }
+ if($found){
+ $this->gosaMemberApplication[$this->curCatDir]=$tmp;
+ }
+ return;
$cat = $this->curCatDir;
$cnt = count($this->gosaMemberApplication[$cat]);
$tmp = array("App" => "__SEPARATOR__".($cnt+1));
}
}
- if(isset($_POST['AddSeperator'])){
- $this->AddSeperator();
- }
-
if((isset($_GET['act']))&&($_GET['act']=="open")){
$this->curCatDir = $_GET['id'];
}
$this->reload();
foreach($_POST as $name => $value){
+ if(preg_match("/AddSep_/",$name)){
+ $this->AddSeperator($value);
+ }
+
+
if(preg_match("/DelApp_/",$name)){
$app = $value;
$separator ="<hr height=1 size=1></hr>";
- $upudown = "<a href='?plug=".$_GET['plug']."&act=one_up&id=%s'> <img src='images/sort_up.png' border=0></a>".
+ $sep = "<input type='image' src='images/back.png' value='%s' name='AddSep_%s'>";
+
+ $upudown ="<a href='?plug=".$_GET['plug']."&act=one_up&id=%s'> <img src='images/sort_up.png' border=0></a>".
" <a href='?plug=".$_GET['plug']."&act=one_down&id=%s'> <img src='images/sort_down.png' border=0></a>".
" <input type='image' src='images/edittrash.png' name='DelApp_%s' value='%s'>";
$edit= " <input type='image' src='images/edit.png' name='EdiApp_%s' value='%s'>";
array("string"=>preg_replace("/\%s/",$entry['App'],$upudown."<img src='images/empty.png' width='19px'>"),"attach"=>"align='right' style='border-right:0px;'")));
}else{
$div2 ->AddEntry(array(array("string"=>sprintf($app,$entry['App'])),
- array("string"=>preg_replace("/\%s/",$entry['App'],$upudown.$edit),"attach"=>"align='right' style='border-right:0px;'")));
+ array("string"=>preg_replace("/\%s/",$entry['App'],$sep.$upudown.$edit),"attach"=>"align='right' style='border-right:0px;'")));
}
}
}