summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ea9d69)
raw | patch | inline | side by side (parent: 6ea9d69)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 May 2010 09:43:46 +0000 (09:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 May 2010 09:43:46 +0000 (09:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18022 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
index 390ca3b073c5d3d2e1adeddd8db3a44246cb23b0..ec84f6050cfce98348367e3df0d159427e5340dd 100644 (file)
return("getbin.php");
}
- /* 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);
- }
-
-
- /* return the position of the element in the array */
- function getpos($atr,$attrs)
- {
- $i = 0;
- foreach($attrs as $attr => $name) {
- $i++;
- if($attr == $atr){
- return($i);
- }
- }
- return(-1);
- }
-
-
- /* Remove this element from array */
- function ArrayRemove($key,$array,$reorder = false)
- {
- if(isset($array[$key])){
- unset($array[$key]);
- if($reorder){
- $tmp = array();
- foreach($array as $entry){
- $tmp[] = $entry;
- }
- $array = $tmp;
- }
- }
- return($array);
- }
-
-
- /* Combine new array */
- function combineArrays($ar0,$ar1,$ar2)
- {
- $ret = array();
- if(is_array($ar0))
- foreach($ar0 as $ar => $a){
- $ret[]=$a;
- }
- if(is_array($ar1))
- foreach($ar1 as $ar => $a){
- $ret[]=$a;
- }
- if(is_array($ar2))
- foreach($ar2 as $ar => $a){
- $ret[]=$a;
- }
- return($ret);
- }
-
/* Return a dialog with all fields that must be changed,
if we want to copy this entry */