Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
manage_migrate.php
Go to the documentation of this file.
1 <?php
6 import('Dataface/TranslationTool.php');
7 import('Dataface/ModuleTool.php');
8 
10 
11 
12  function handle(&$params){
13 
15  if ( !is_array(@$app->_conf['_modules']) ) $app->_conf['_modules'] = array();
16 
17  if ( !isset($app->_conf['_modules']['Dataface_TranslationTool']) ){
18  $app->_conf['_modules']['Dataface_TranslationTool'] = 'Dataface/TranslationTool.php';
19  }
20  $context = array();
22  if ( count($_POST) > 0 ){
23 
24  $modules = $_POST['modules'];
25 
26  $log = $mt->migrate(array_keys($modules));
27  $context['log'] = $log;
28 
29 
30  } else {
31 
32 
33 
34  $context['migrations'] = $mt->getMigrations();
35 
36 
37 
38  ob_start();
39  //$form->display();
40  $context['form'] = ob_get_contents();
41  ob_end_clean();
42 
43  }
44 
45  df_display($context, 'actions_manage_migrate.html');
46 
47 
48  }
49 }
50 
51 
52 ?>