Dotclear

Changeset 233:3a034fd6b76c


Ignore:
Timestamp:
05/10/11 13:48:32 (13 years ago)
Author:
Franck <carnet.franck.paul@…>
Branch:
default
Children:
234:e5b6717225f7, 235:e692c6cccedf
Message:

Import/Export? de la table des préférences utilisateurs

  • Uniquement sur un export/import complet
  • Fonctionne comme pour les utilisateurs (pas d'écrasement)
Location:
plugins/importExport/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/importExport/inc/class.dc.export.flat.php

    r125 r233  
    106106                    $exp->exportTable('setting'); 
    107107                    $exp->exportTable('user'); 
     108                    $exp->exportTable('pref'); 
    108109                    $exp->exportTable('permissions'); 
    109110                    $exp->exportTable('post'); 
  • plugins/importExport/inc/flat/class.dc.import.php

    r0 r233  
    8484          $this->cur_setting     = $this->con->openCursor($this->prefix.'setting'); 
    8585          $this->cur_user        = $this->con->openCursor($this->prefix.'user'); 
     86          $this->cur_pref        = $this->con->openCursor($this->prefix.'pref'); 
    8687          $this->cur_permissions = $this->con->openCursor($this->prefix.'permissions'); 
    8788          $this->cur_post        = $this->con->openCursor($this->prefix.'post'); 
     
    253254                              $this->insertUser($line); 
    254255                              break; 
     256                         case 'pref': 
     257                              $this->insertPref($line); 
     258                              break; 
    255259                         case 'permissions': 
    256260                              $this->insertPermissions($line); 
     
    363367           
    364368          $this->cur_setting->insert(); 
     369     } 
     370      
     371     private function insertPref($pref) 
     372     { 
     373          $this->cur_pref->clean(); 
     374           
     375          $this->cur_pref->pref_id    = (string) $pref->pref_id; 
     376          $this->cur_pref->user_id    = !$pref->user_id ? null : (string) $pref->user_id; 
     377          $this->cur_pref->pref_ws    = (string) $pref->pref_ws; 
     378          $this->cur_pref->pref_value = (string) $pref->pref_value; 
     379          $this->cur_pref->pref_type  = (string) $pref->pref_type; 
     380          $this->cur_pref->pref_label = (string) $pref->pref_label; 
     381           
     382          $this->cur_pref->insert(); 
    365383     } 
    366384      
Note: See TracChangeset for help on using the changeset viewer.

Sites map