Xataface 2.0
Xataface Application Framework
actions/manage_migrate.php
Go to the documentation of this file.
00001 <?php
00006 import('Dataface/TranslationTool.php');
00007 import('Dataface/ModuleTool.php');
00008 
00009 class dataface_actions_manage_migrate {
00010 
00011 
00012         function handle(&$params){
00013         
00014                 $app =& Dataface_Application::getInstance();
00015                 if ( !is_array(@$app->_conf['_modules']) ) $app->_conf['_modules'] = array();
00016                 
00017                 if ( !isset($app->_conf['_modules']['Dataface_TranslationTool']) ){
00018                         $app->_conf['_modules']['Dataface_TranslationTool'] = 'Dataface/TranslationTool.php';
00019                 }
00020                 $context = array();
00021                 $mt =& Dataface_ModuleTool::getInstance();
00022                 if ( count($_POST) > 0 ){
00023                         
00024                         $modules = $_POST['modules'];
00025                         
00026                         $log = $mt->migrate(array_keys($modules));
00027                         $context['log'] = $log;
00028                         
00029 
00030                 } else {
00031                 
00032                         
00033                         
00034                         $context['migrations'] = $mt->getMigrations();
00035                         
00036                         
00037                         
00038                         ob_start();
00039                         //$form->display();
00040                         $context['form'] = ob_get_contents();
00041                         ob_end_clean();
00042                 
00043                 }
00044                 
00045                 df_display($context, 'actions_manage_migrate.html');
00046                 
00047                 
00048         }
00049 }
00050 
00051 
00052 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations