Changeset 13888

Show
Ignore:
Timestamp:
12/14/07 10:28:04 (10 months ago)
Author:
bergie
Message:

Save the structure too

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.filesync/exec/export_structure.php

    r13817 r13888  
    55$exporter = midcom_helper_filesync_exporter::create('structure'); 
    66$exporter->export(); 
     7echo "Target: {$exporter->root_dir}\n"; 
    78?> 
  • trunk/midcom/midcom.helper.filesync/exporter/structure.php

    r13818 r13888  
    2121    { 
    2222        parent::midcom_helper_filesync_exporter(); 
     23         
     24        $this->root_dir = midcom_helper_filesync_interface::prepare_dir('structure'); 
    2325    } 
    2426     
     
    7678        $structure[$structure_name]['root'] = $this->read_node($root_node); 
    7779         
    78         return $structure
     80        file_put_contents("{$this->root_dir}{$structure_name}.inc", $this->_draw_array($structure))
    7981    } 
    8082     
     
    125127    function export() 
    126128    { 
    127         echo $this->_draw_array($this->read_structure()); 
     129        $this->read_structure(); 
    128130    } 
    129131}