[Alba-desarrollo] SVN Alba r6113 - prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions

commits en pressenter.com.ar commits en pressenter.com.ar
Vie Abr 24 20:26:47 CEST 2009


Author: josx
Date: 2009-04-24 15:26:47 -0300 (Fri, 24 Apr 2009)
New Revision: 6113

Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php
Log:
Cambiando sintaxis de creole a PDO

Modified: prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php	2009-04-22 21:59:52 UTC (rev 6112)
+++ prosistem/alba/trunk/alba/apps/principal/modules/locacion/actions/actions.class.php	2009-04-24 18:26:47 UTC (rev 6113)
@@ -40,7 +40,7 @@
         $con = Propel::getConnection();
         try {
 
-            $con->begin();
+            $con->beginTransaction();
 
             if ($locacion->getPrincipal()) {
 
@@ -49,8 +49,7 @@
                 $s .= "WHERE locacion.id = rel_establecimiento_locacion.fk_locacion_id AND ";
                 $s .= "rel_establecimiento_locacion.fk_establecimiento_id = ".$this->getUser()->getAttribute('fk_establecimiento_id');
 
-                $stmt = $con->createStatement();
-                $alumnos = $stmt->executeQuery($s);
+                $alumnos = $con->query($s);
             }
             
             $locacion->save();                                                                
@@ -63,7 +62,7 @@
             $con->commit();
         }
         catch (Exception $e) {
-            $con->rollback();
+            $con->rollBack();
             throw $e;
         }
     }




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