X-Git-Url: https://git.llucax.com/mecon/samurai.git/blobdiff_plain/a3c3c4bd5f700396b8aa650bb1095d15766a9845..c74aaa35877c730b8eeee3800836bddcc7eb8b8f:/lib/SAMURAI/Permiso.php 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 ?>