openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 50472ef721e366b30ed27a56fc6ff3c23e584604
parent 03fce98723a51fe0d736a8f97ed5dc19ec7d80d9
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 30 Oct 2012 23:20:43 +0100

Vorbereitung für Sync-Funktion.

Diffstat:
action/ProjectAction.class.php | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
model/Project.class.php | 17++++++++++++++++-
2 files changed, 80 insertions(+), 3 deletions(-)

diff --git a/action/ProjectAction.class.php b/action/ProjectAction.class.php @@ -183,12 +183,74 @@ class ProjectAction extends Action } } + + + /** + * Synchronisation mit dem Dateisystem. + */ + public function syncPost() + { + + } + + + /** + * Synchronisation mit dem Dateisystem. + */ + public function syncView() + { + global $conf; + $syncConf = $conf['sync']; + + if ( ! $syncConf['enabled'] ) + return; + + $syncDir = slashify($syncConf['directory']).$this->project->name; + + + } + + + /** + * Import aus dem Dateisystem. + */ + public function importView() + { + + } + + + /** + * Import aus dem Dateisystem. + */ + public function importPost() + { + + } + + + /** + * Export in Dateisystem. + */ + public function exportView() + { + + } + + + /** + * Export in Dateisystem. + */ + public function exportPost() + { + + } /** * Projekt exportieren. */ - function exportView() + public function copyView() { } @@ -197,7 +259,7 @@ class ProjectAction extends Action /** * Projekt exportieren. */ - function exportPost() + public function copyPost() { $db = db_connection(); $this->setTemplateVar( 'dbid',$db->id ); diff --git a/model/Project.class.php b/model/Project.class.php @@ -503,6 +503,21 @@ EOF /** + * Synchronisation des Projektinhaltes mit dem Dateisystem. + */ + public function sync() + { + global $conf; + $syncConf = $conf['sync']; + + if ( ! $syncConf['enabled'] ) + return; + + $syncDir = slashify($syncConf['directory']).$this->name; + + } + + /** * Kopiert ein Projekt von einer Datenbank zu einer anderen.<br> * <br> * Alle Projektinhalte werden kopiert, die Fremdschluesselbeziehungen werden entsprechend angepasst.<br> @@ -512,7 +527,7 @@ EOF * * @param dbid_destination ID der Ziel-Datenbank */ - function export( $dbid_destination ) + function copy( $dbid_destination,$name='' ) { Logger::debug( 'Copying project '.$this->name.' to database '.$dbid_destination );