Changeset 6361
- Timestamp:
- 08/12/08 16:00:33 (5 years ago)
- Files:
-
- modules/branches/2.5/core/functions.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/core/functions.inc.php
r6347 r6361 2876 2876 // find the next available ID 2877 2877 $trunknum = 1; 2878 2879 // This is pretty ugle, will fix when we redo trunks and routes with proper uniqueids. 2880 // get the list, sort them, then look for a hole and use it, or overflow to the end if 2881 // not and use that 2882 // 2883 $trunk_hash = array(); 2878 2884 foreach(core_trunks_list() as $trunk) { 2879 if ($trunknum == ltrim($trunk[0],"OUT_")) { 2880 $trunknum++; 2881 } 2885 $trunknum = ltrim($trunk[0],"OUT_"); 2886 $trunk_hash[] = $trunknum; 2887 } 2888 sort($trunk_hash); 2889 $trunknum = 1; 2890 foreach ($trunk_hash as $trunk_id) { 2891 if ($trunk_id != $trunknum) { 2892 break; 2893 } 2894 $trunknum++; 2882 2895 } 2883 2896
