Changeset 873:f9ef04edef05 for inc/core/class.dc.workspace.php
- Timestamp:
- 08/14/12 15:43:05 (13 years ago)
- Branch:
- sexy
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.workspace.php
r147 r873 53 53 } 54 54 55 private function getPrefs($ rs=null)55 private function getPrefs($settings=null) 56 56 { 57 if ($ rs == null) {57 if ($settings == null) { 58 58 $strReq = 'SELECT user_id, pref_id, pref_value, '. 59 59 'pref_type, pref_label, pref_ws '. … … 65 65 66 66 try { 67 $ rs = $this->con->select($strReq);67 $settings = $this->con->select($strReq); 68 68 } catch (Exception $e) { 69 69 throw $e; 70 70 } 71 71 } 72 while ($rs->fetch())73 { 74 if ($ rs->f('pref_ws') != $this->ws){72 foreach ($settings as $s) 73 { 74 if ($s->f('pref_ws') != $this->ws){ 75 75 break; 76 76 } 77 $id = trim($ rs->f('pref_id'));78 $value = $ rs->f('pref_value');79 $type = $ rs->f('pref_type');77 $id = trim($s->f('pref_id')); 78 $value = $s->f('pref_value'); 79 $type = $s->f('pref_type'); 80 80 81 81 if ($type == 'float' || $type == 'double') { … … 87 87 settype($value,$type); 88 88 89 $array = $ rs->user_id ? 'local' : 'global';89 $array = $s->user_id ? 'local' : 'global'; 90 90 91 91 $this->{$array.'_prefs'}[$id] = array( … … 93 93 'value' => $value, 94 94 'type' => $type, 95 'label' => (string) $ rs->f('pref_label'),96 'global' => $ rs->user_id == ''95 'label' => (string) $s->f('pref_label'), 96 'global' => $s->user_id == '' 97 97 ); 98 98 }
Note: See TracChangeset
for help on using the changeset viewer.