[Alba-desarrollo] SVN Alba r6312 - prosistem/alba/trunk/alba/web/instalar

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Ene 13 18:16:07 CET 2010


Author: ftoledo
Date: 2010-01-13 14:16:07 -0300 (Wed, 13 Jan 2010)
New Revision: 6312

Modified:
   prosistem/alba/trunk/alba/web/instalar/funciones.php
   prosistem/alba/trunk/alba/web/instalar/instalar.php
Log:
llamando a tareas de propel.



Modified: prosistem/alba/trunk/alba/web/instalar/funciones.php
===================================================================
--- prosistem/alba/trunk/alba/web/instalar/funciones.php	2009-12-16 23:32:19 UTC (rev 6311)
+++ prosistem/alba/trunk/alba/web/instalar/funciones.php	2010-01-13 17:16:07 UTC (rev 6312)
@@ -321,42 +321,29 @@
 
 
 function build_model_sql() {
-    chdir('../../');
 
-    define('STDOUT','');
-    define('STDERR','');
-
-    require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
+    define ('STDOUT','');
+    $pconfig = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'ProjectConfiguration.class.php';
+    DebugLog('pconfig: ' . $pconfig);
+    require($pconfig);
     $configuration = ProjectConfiguration::getApplicationConfiguration('principal', 'dev', true);
     sfContext::createInstance($configuration);
 
+    $dispatcher = sfContext::getInstance()->getEventDispatcher();
+    $formatter = new sfFormatter();
+    $args = array();
+    $options = array();
+    
+    $task = new sfPropelBuildModelTask($dispatcher,$formatter);
+    chdir(sfConfig::get('sf_root_dir'));
+    $task->run($args, $options);
+    
+    $task = new sfPropelBuildSqlTask($dispatcher, $formatter);
+    chdir(sfConfig::get('sf_root_dir'));
+    $task->run($args, $options);
+  
 
-
-
-
-    require_once($sf_symfony_lib_dir.'/vendor/pake/pakeFunction.php');
-    require_once($sf_symfony_lib_dir.'/vendor/pake/pakeGetopt.class.php');
-
-
-    $dirs = array(
-    sfConfig::get('sf_data_dir').DIRECTORY_SEPARATOR.'tasks'         => 'myPake*.php', // project tasks
-    sfConfig::get('sf_symfony_data_dir').DIRECTORY_SEPARATOR.'tasks' => 'sfPake*.php', // symfony tasks
-    sfConfig::get('sf_root_dir').'/plugins/*/data/tasks'             => '*.php',       // plugin tasks
-    );
-
-    foreach ($dirs as $globDir => $name)
-    {
-        if ($dirs = glob($globDir))
-        {
-            $tasks = pakeFinder::type('file')->name($name)->in($dirs);
-            foreach ($tasks as $task)
-            {
-                include_once($task);
-            }
-        }
-    }
-    $pake = pakeApp::get_instance();
-
+    /*
     try
     {
         $ret = $pake->run(sfConfig::get('sf_symfony_data_dir').DIRECTORY_SEPARATOR.'tasks'.DIRECTORY_SEPARATOR.'sfPakePropel.php', array('propel-build-model','--quiet') , true);
@@ -374,14 +361,11 @@
     {
         print "<strong>ERROR</strong>: ".$e->getMessage();
     }
-
+*/
 }
 
 
 
-
-
-
 /*
 <?php
 ##IP_CHECK##

Modified: prosistem/alba/trunk/alba/web/instalar/instalar.php
===================================================================
--- prosistem/alba/trunk/alba/web/instalar/instalar.php	2009-12-16 23:32:19 UTC (rev 6311)
+++ prosistem/alba/trunk/alba/web/instalar/instalar.php	2010-01-13 17:16:07 UTC (rev 6312)
@@ -27,7 +27,7 @@
  * @filesource
  * @license GPL
  */
-
+error_reporting(E_ALL);
 session_start();
 
 date_default_timezone_set('America/Argentina/Buenos_Aires');




Más información sobre la lista de distribución Alba-desarrollo