Changeset 13886

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

Snippet to filesystem exporter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.filesync/config/config.inc

    r13816 r13886  
    11'vcs_git_enable' => false, 
     2'filesync_path'  => '/var/spool/midgard/filesync', 
  • trunk/midcom/midcom.helper.filesync/locale/default.en.txt

    r13816 r13886  
    33---LANGUAGE en 
    44 
    5 ---STRING This is the index 
    6 This is the index 
     5---STRING midcom.helper.filesync 
     6Site filesystem synchronizer 
    77---STRINGEND 
    8  
    9 ---STRING You can change this to something else :-) 
    10 You can change this to something else :-) 
    11 ---STRINGEND 
    12  
  • trunk/midcom/midcom.helper.filesync/midcom/interfaces.php

    r13816 r13886  
    3434    } 
    3535 
     36    function prepare_dir($prefix) 
     37    { 
     38        $path = $this->_config->get('filesync_path'); 
     39        if (!file_exists($path)) 
     40        { 
     41            mkdir($path); 
     42        } 
     43         
     44        if (substr($path, -1) != '/') 
     45        { 
     46            $path .= '/'; 
     47        } 
     48         
     49        $module_dir = "{$path}snippets"; 
     50        if (!file_exists($module_dir)) 
     51        { 
     52            mkdir($module_dir); 
     53        } 
     54         
     55        return "{$module_dir}/"; 
     56    } 
    3657} 
    3758?>