- Timestamp:
- Aug 2, 2009, 5:16:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/routerboard.php
r241 r242 151 151 function ListUpdate($Path, $Properties, $Values, $Condition = array(), $UsePrint = false) 152 152 { 153 if($UsePrint == 0) $List = $this->ListGet($Path, $Properties, $Condition); 154 else $List = $this->ListGetPrint($Path, $Properties, $Condition); 153 if($UsePrint == 0) 154 { 155 $List = $this->ListGet($Path, $Properties, $Condition); 156 // Change boolean values yes/no to true/false 157 foreach($List as $Index => $ListItem) 158 { 159 foreach($ListItem as $Index2 => $Item2) 160 { 161 if($Item2 == 'true') $List[$Index][$Index2] = 'yes'; 162 if($Item2 == 'false') $List[$Index][$Index2] = 'no'; 163 } 164 } 165 } else 166 { 167 $List = $this->ListGetPrint($Path, $Properties, $Condition); 168 } 155 169 $Commands = array(); 156 170 … … 184 198 ksort($List[$Index]); 185 199 } 186 print_r($List);187 print_r($Values);188 200 //print_r($List); 201 //print_r($Values); 202 189 203 // Erase all items not existed in $Values 190 204 foreach($List as $Index => $ListItem) … … 195 209 foreach($ListItem as $Index => $Property) 196 210 { 197 if($Property != '') $Prop .= $Index.'="'.$Property.'" '; 211 if($Property != '') 212 { 213 if(($Property == 'yes') or ($Property == 'no')) $Prop .= $Index.'='.$Property.' '; 214 else $Prop .= $Index.'="'.$Property.'" '; 215 } 198 216 } 199 217 $Prop = substr($Prop, 0, -1);
Note:
See TracChangeset
for help on using the changeset viewer.