mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadido autorute a true y corregidos errores del metodo request-
This commit is contained in:
@ -83,12 +83,10 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
public function add($tipo_impresion_id = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -97,7 +95,7 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
if (!isset($sanitizedData['papel_formato_id']) || $sanitizedData['papel_formato_id'] == null) {
|
||||
$sanitizedData['papel_formato_id'] = 0;
|
||||
@ -170,8 +168,6 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -184,9 +180,9 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -197,7 +193,7 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
if ($this->request->getPost('is_duplicado') == null) {
|
||||
$sanitizedData['is_duplicado'] = 0;
|
||||
|
||||
Reference in New Issue
Block a user