Dotclear

Changeset 880:02c78f56f430


Ignore:
Timestamp:
08/22/12 09:06:05 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
sexy
Message:

fixed same regression as in namespaces...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.workspace.php

    r873 r880  
    5353     } 
    5454      
    55      private function getPrefs($settings=null) 
     55     private function getPrefs($rs=null) 
    5656     {     
    57           if ($settings == null) { 
     57          if ($rs == null) { 
    5858               $strReq = 'SELECT user_id, pref_id, pref_value, '. 
    5959                         'pref_type, pref_label, pref_ws '. 
     
    6565           
    6666               try { 
    67                     $settings = $this->con->select($strReq); 
     67                    $rs = $this->con->select($strReq); 
    6868               } catch (Exception $e) { 
    6969                    throw $e; 
    7070               } 
    7171          } 
    72           foreach ($settings as $s) 
    73           { 
    74                if ($s->f('pref_ws') != $this->ws){ 
     72          while ($rs->fetch()) 
     73          { 
     74               if ($rs->f('pref_ws') != $this->ws){ 
    7575                    break; 
    7676               } 
    77                $id = trim($s->f('pref_id')); 
    78                $value = $s->f('pref_value'); 
    79                $type = $s->f('pref_type'); 
     77               $id = trim($rs->f('pref_id')); 
     78               $value = $rs->f('pref_value'); 
     79               $type = $rs->f('pref_type'); 
    8080                
    8181               if ($type == 'float' || $type == 'double') { 
     
    8787               settype($value,$type); 
    8888                
    89                $array = $s->user_id ? 'local' : 'global'; 
     89               $array = $rs->user_id ? 'local' : 'global'; 
    9090                
    9191               $this->{$array.'_prefs'}[$id] = array( 
     
    9393                    'value' => $value, 
    9494                    'type' => $type, 
    95                     'label' => (string) $s->f('pref_label'), 
    96                     'global' => $s->user_id == '' 
     95                    'label' => (string) $rs->f('pref_label'), 
     96                    'global' => $rs->user_id == '' 
    9797               ); 
    9898          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map