From c74aaa35877c730b8eeee3800836bddcc7eb8b8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Tue, 16 Mar 2004 15:46:42 +0000 Subject: [PATCH] BugFix. --- lib/SAMURAI/Permiso.php | 7 +++++-- lib/SAMURAI/Usuario.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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) { -- 2.43.0