summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9f5dcb)
raw | patch | inline | side by side (parent: a9f5dcb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 May 2010 09:43:44 +0000 (09:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 May 2010 09:43:44 +0000 (09:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18021 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiProfile.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index ee9e9fbcc40ce98bc9c5355c52bbe1e2388b9be2..4494cd2dcc235a8da1dfb1a8eb9eedf774f4a486 100644 (file)
}
- /* Combine new array, used for up down buttons */
- function combineArrays($ar0,$ar1,$ar2)
- {
- $ret = array();
- if(is_array($ar0))
- foreach($ar0 as $ar => $a){
- $ret[$ar]=$a;
- }
- if(is_array($ar1))
- foreach($ar1 as $ar => $a){
- $ret[$ar]=$a;
- }
- if(is_array($ar2))
- foreach($ar2 as $ar => $a){
- $ret[$ar]=$a;
- }
- return($ret);
- }
-
-
function acl_base_for_current_object($dn)
{
if($dn == "new" || $dn == ""){
}
- /* returns position in array */
- function getpos($atr,$attrs)
- {
- $i = 0;
- foreach($attrs as $attr => $name) {
- $i++;
- if($attr == $atr){
- return($i);
- }
- }
- return(-1);
- }
-
- /* Transports the given Arraykey one position up*/
- function ArrayUp($atr,$attrs)
- {
- $ret = $attrs;
- $pos = $this->getpos($atr,$attrs) ;
- $cn = count($attrs);
- if(!(($pos == -1)||($pos == 1))){
- $before = array_slice($attrs,0,($pos-2));
- $mitte = array_reverse(array_slice($attrs,($pos-2),2));
- $unten = array_slice($attrs,$pos);
- $ret = array();
- $ret = $this->combineArrays($before,$mitte,$unten);
- }
- return($ret);
- }
-
-
- /* Transports the given Arraykey one position down*/
- function ArrayDown($atr,$attrs)
- {
- $ret = $attrs;
- $pos = $this->getpos($atr,$attrs) ;
- $cn = count($attrs);
- if(!(($pos == -1)||($pos == $cn))){
- $before = array_slice($attrs,0,($pos-1));
- $mitte = array_reverse(array_slice($attrs,($pos-1),2));
- $unten = array_slice($attrs,($pos+1));
- $ret = array();
- $ret = $this->combineArrays($before,$mitte,$unten);
- }
- return($ret);
- }
-
- /* class one position up */
- function catUp($id)
- {
- /* Get all cats depinding on current dir */
- $cats = $this->FAIclasses;
- $this->FAIclasses =$this->ArrayUp($id,$cats);
- }
-
- /* Class one position down */
- function catDown($id)
- {
- /* Get all cats depinding on current dir */
- $cats = $this->FAIclasses;
- $this->FAIclasses =$this->ArrayDown($id,$cats);
- }
-
function execute()
{
/* Call parent execute */