From: Martín Marrese Date: Tue, 16 Mar 2004 15:46:42 +0000 (+0000) Subject: BugFix. X-Git-Tag: svn_import~17 X-Git-Url: https://git.llucax.com/mecon/samurai.git/commitdiff_plain/c74aaa35877c730b8eeee3800836bddcc7eb8b8f BugFix. --- diff --git a/lib/SAMURAI/Permiso.php b/lib/SAMURAI/Permiso.php index faca0f8..1d45cbd 100644 --- a/lib/SAMURAI/Permiso.php +++ b/lib/SAMURAI/Permiso.php @@ -232,7 +232,11 @@ class SAMURAI_Permiso { 'desc_permiso' => $this->getDescripcion(), 'responsable' => $this->getResponsable(), ); - return $this->_db->autoExecute('samurai.permiso', $datos, DB_AUTOQUERY_INSERT); + $res = $this->_db->autoExecute('samurai.permiso', $datos, DB_AUTOQUERY_INSERT); + if (PEAR::isError($res)) { + return $res; + } + $this->setId($idPermiso); } // -X2C @@ -424,7 +428,6 @@ class SAMURAI_Permiso { } return $db->query ($sql); } - } // -X2C Class :SAMURAI_Permiso ?> diff --git a/lib/SAMURAI/Usuario.php b/lib/SAMURAI/Usuario.php index 28a2755..df6c943 100644 --- a/lib/SAMURAI/Usuario.php +++ b/lib/SAMURAI/Usuario.php @@ -319,7 +319,7 @@ class SAMURAI_Usuario { * @return mixed * @access public */ - function guardarDatos($accion = grabar) // ~X2C + function guardarDatos($accion = 'grabar') // ~X2C { $accion = strtolower($accion); switch ($accion) {