|
@@ -613,7 +613,7 @@ class SystemAdministratorController extends Controller{
|
|
|
"FECHA" => $now->timestamp
|
|
"FECHA" => $now->timestamp
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- copy($catalogue->AFAL_UBIC, 'C:\\ITTEC\\SAM\\Dev\\SistemaMantenimiento\\sistema-mantenimiento-back\\public_files\\' . $id);
|
|
|
|
|
|
|
+ copy($catalogue->AFAL_UBIC, $this->functionsController->getBasePath() . '/public_files/' . $id);
|
|
|
|
|
|
|
|
$actions = DB::getQueryLog();
|
|
$actions = DB::getQueryLog();
|
|
|
$name = $this->functionsController->joinName($usr->USUA_NOMB, $usr->USUA_APPA, $usr->USUA_APMA);
|
|
$name = $this->functionsController->joinName($usr->USUA_NOMB, $usr->USUA_APPA, $usr->USUA_APMA);
|
|
@@ -1370,12 +1370,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $filePoliticsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json');
|
|
|
|
|
|
|
+ $filePoliticsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json');
|
|
|
if(!$filePoliticsExists){
|
|
if(!$filePoliticsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de politicas de seguridad no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de politicas de seguridad no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $politicsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json');
|
|
|
|
|
|
|
+ $politicsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json');
|
|
|
$politicsArr = json_decode($politicsStr, true);
|
|
$politicsArr = json_decode($politicsStr, true);
|
|
|
$passwordFormat = $politicsArr['password_format'];
|
|
$passwordFormat = $politicsArr['password_format'];
|
|
|
$formatBKP = $politicsStr;
|
|
$formatBKP = $politicsStr;
|
|
@@ -1390,7 +1390,7 @@ class SystemAdministratorController extends Controller{
|
|
|
|
|
|
|
|
$politicsArr['password_format'] = $passwordFormat;
|
|
$politicsArr['password_format'] = $passwordFormat;
|
|
|
$finalStr = json_encode($politicsArr);
|
|
$finalStr = json_encode($politicsArr);
|
|
|
- file_put_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json', $finalStr);
|
|
|
|
|
|
|
+ file_put_contents($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json', $finalStr);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
|
$nowStr = $now->toDateTimeString();
|
|
$nowStr = $now->toDateTimeString();
|
|
@@ -1500,12 +1500,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $filePoliticsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json');
|
|
|
|
|
|
|
+ $filePoliticsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json');
|
|
|
if(!$filePoliticsExists){
|
|
if(!$filePoliticsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de politicas de seguridad no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de politicas de seguridad no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $politicsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json');
|
|
|
|
|
|
|
+ $politicsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json');
|
|
|
$politicsArr = json_decode($politicsStr, true);
|
|
$politicsArr = json_decode($politicsStr, true);
|
|
|
$sessionsDuration = $politicsArr['sessions_duration'];
|
|
$sessionsDuration = $politicsArr['sessions_duration'];
|
|
|
$formatBKP = $politicsStr;
|
|
$formatBKP = $politicsStr;
|
|
@@ -1517,7 +1517,7 @@ class SystemAdministratorController extends Controller{
|
|
|
|
|
|
|
|
$politicsArr['sessions_duration'] = $sessionsDuration;
|
|
$politicsArr['sessions_duration'] = $sessionsDuration;
|
|
|
$finalStr = json_encode($politicsArr);
|
|
$finalStr = json_encode($politicsArr);
|
|
|
- file_put_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json', $finalStr);
|
|
|
|
|
|
|
+ file_put_contents($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json', $finalStr);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
|
$nowStr = $now->toDateTimeString();
|
|
$nowStr = $now->toDateTimeString();
|
|
@@ -1624,18 +1624,18 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $filePoliticsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json');
|
|
|
|
|
|
|
+ $filePoliticsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json');
|
|
|
if(!$filePoliticsExists){
|
|
if(!$filePoliticsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de politicas de seguridad no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de politicas de seguridad no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $politicsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json');
|
|
|
|
|
|
|
+ $politicsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json');
|
|
|
$politicsArr = json_decode($politicsStr, true);
|
|
$politicsArr = json_decode($politicsStr, true);
|
|
|
$formatBKP = $politicsStr;
|
|
$formatBKP = $politicsStr;
|
|
|
|
|
|
|
|
$politicsArr['active_sessions_number'] = intval($info['sessions']);
|
|
$politicsArr['active_sessions_number'] = intval($info['sessions']);
|
|
|
$finalStr = json_encode($politicsArr);
|
|
$finalStr = json_encode($politicsArr);
|
|
|
- file_put_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\security-politics.json', $finalStr);
|
|
|
|
|
|
|
+ file_put_contents($this->functionsController->getBasePath() .'\storage\app\files\security-politics.json', $finalStr);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
|
$nowStr = $now->toDateTimeString();
|
|
$nowStr = $now->toDateTimeString();
|
|
@@ -1699,12 +1699,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $maintenanceModeExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json');
|
|
|
|
|
|
|
+ $maintenanceModeExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\maintenance_mode.json');
|
|
|
if(!$maintenanceModeExists){
|
|
if(!$maintenanceModeExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de mantenimiento no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de mantenimiento no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $maintenanceStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json');
|
|
|
|
|
|
|
+ $maintenanceStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\maintenance_mode.json');
|
|
|
$maintenanceArr = json_decode($maintenanceStr, true);
|
|
$maintenanceArr = json_decode($maintenanceStr, true);
|
|
|
|
|
|
|
|
if($maintenanceArr['activated']){
|
|
if($maintenanceArr['activated']){
|
|
@@ -1723,7 +1723,7 @@ class SystemAdministratorController extends Controller{
|
|
|
$maintenanceArr['activated'] = true;
|
|
$maintenanceArr['activated'] = true;
|
|
|
$maintenanceArr['last_activation_id'] = $idMant;
|
|
$maintenanceArr['last_activation_id'] = $idMant;
|
|
|
$finalStr = json_encode($maintenanceArr);
|
|
$finalStr = json_encode($maintenanceArr);
|
|
|
- file_put_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json', $finalStr);
|
|
|
|
|
|
|
+ file_put_contents( $this->functionsController->getBasePath() . '\storage\app\files\maintenance_mode.json', $finalStr);
|
|
|
|
|
|
|
|
$actions = DB::getQueryLog();
|
|
$actions = DB::getQueryLog();
|
|
|
$name = $this->functionsController->joinName($usr->USUA_NOMB, $usr->USUA_APPA, $usr->USUA_APMA);
|
|
$name = $this->functionsController->joinName($usr->USUA_NOMB, $usr->USUA_APPA, $usr->USUA_APMA);
|
|
@@ -1777,12 +1777,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $maintenanceModeExists = file_exists('C:\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json');
|
|
|
|
|
|
|
+ $maintenanceModeExists = file_exists($this->functionsController->getBasePath() . '\storage\app\files\maintenance_mode.json');
|
|
|
if(!$maintenanceModeExists){
|
|
if(!$maintenanceModeExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de mantenimiento no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de mantenimiento no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $maintenanceStr = file_get_contents('C:\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json');
|
|
|
|
|
|
|
+ $maintenanceStr = file_get_contents($this->functionsController->getBasePath() . '\storage\app\files\maintenance_mode.json');
|
|
|
$maintenanceArr = json_decode($maintenanceStr, true);
|
|
$maintenanceArr = json_decode($maintenanceStr, true);
|
|
|
|
|
|
|
|
if(!$maintenanceArr['activated']){
|
|
if(!$maintenanceArr['activated']){
|
|
@@ -1797,7 +1797,7 @@ class SystemAdministratorController extends Controller{
|
|
|
if(!is_null($maintenanceDB->HMSA_USDE)){
|
|
if(!is_null($maintenanceDB->HMSA_USDE)){
|
|
|
$maintenanceArr['activated'] = false;
|
|
$maintenanceArr['activated'] = false;
|
|
|
$finalStr = json_encode($maintenanceArr);
|
|
$finalStr = json_encode($maintenanceArr);
|
|
|
- file_put_contents('C:\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json', $finalStr);
|
|
|
|
|
|
|
+ file_put_contents($this->functionsController->getBasePath() . '\storage\app\files\maintenance_mode.json', $finalStr);
|
|
|
|
|
|
|
|
return $this->responseController->makeResponse(true, 'El modo mantenimiento ya fue desactivado en la base de datos.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El modo mantenimiento ya fue desactivado en la base de datos.', [], 500);
|
|
|
}
|
|
}
|
|
@@ -1816,7 +1816,7 @@ class SystemAdministratorController extends Controller{
|
|
|
|
|
|
|
|
$maintenanceArr['activated'] = false;
|
|
$maintenanceArr['activated'] = false;
|
|
|
$finalStr = json_encode($maintenanceArr);
|
|
$finalStr = json_encode($maintenanceArr);
|
|
|
- file_put_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json', $finalStr);
|
|
|
|
|
|
|
+ file_put_contents($this->functionsController->getBasePath() . '\storage\app\files\maintenance_mode.json', $finalStr);
|
|
|
|
|
|
|
|
$actions = DB::getQueryLog();
|
|
$actions = DB::getQueryLog();
|
|
|
$name = $this->functionsController->joinName($usr->USUA_NOMB, $usr->USUA_APPA, $usr->USUA_APMA);
|
|
$name = $this->functionsController->joinName($usr->USUA_NOMB, $usr->USUA_APPA, $usr->USUA_APMA);
|
|
@@ -1944,12 +1944,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $maintenanceModeExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json');
|
|
|
|
|
|
|
+ $maintenanceModeExists = file_exists($this->functionsController->getBasePath() . '\storage\app\files\maintenance_mode.json');
|
|
|
if(!$maintenanceModeExists){
|
|
if(!$maintenanceModeExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de mantenimiento no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de mantenimiento no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $maintenanceStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\maintenance_mode.json');
|
|
|
|
|
|
|
+ $maintenanceStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\maintenance_mode.json');
|
|
|
$maintenanceArr = json_decode($maintenanceStr, true);
|
|
$maintenanceArr = json_decode($maintenanceStr, true);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
@@ -3148,7 +3148,7 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $iconsStr = file_get_contents("C:\\ITTEC\\SAM\\Dev\\SistemaMantenimiento\\sistema-mantenimiento-back\\storage\\app\\files\\icons.json");
|
|
|
|
|
|
|
+ $iconsStr = file_get_contents($this->functionsController->getBasePath() . '\storage\app\files\icons.json');
|
|
|
$iconsArr = json_decode($iconsStr, true);
|
|
$iconsArr = json_decode($iconsStr, true);
|
|
|
$icons = $iconsArr['icons'];
|
|
$icons = $iconsArr['icons'];
|
|
|
|
|
|
|
@@ -3199,12 +3199,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $systemParamsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $systemParamsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
if(!$systemParamsExists){
|
|
if(!$systemParamsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $paramsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $paramsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
@@ -3262,12 +3262,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $systemParamsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $systemParamsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
if(!$systemParamsExists){
|
|
if(!$systemParamsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $paramsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $paramsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
|
|
|
|
|
|
$newPriorities = json_decode($form['priorities'], true);
|
|
$newPriorities = json_decode($form['priorities'], true);
|
|
@@ -3277,7 +3277,7 @@ class SystemAdministratorController extends Controller{
|
|
|
|
|
|
|
|
$paramsArr['order_priorities'] = $newPriorities;
|
|
$paramsArr['order_priorities'] = $newPriorities;
|
|
|
$paramsStr = json_encode($paramsArr);
|
|
$paramsStr = json_encode($paramsArr);
|
|
|
- file_put_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json', $paramsStr);
|
|
|
|
|
|
|
+ file_put_contents($this->functionsController->getBasePath() .'\storage\app\files\system-params.json', $paramsStr);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
|
$nowStr = $now->toDateTimeString();
|
|
$nowStr = $now->toDateTimeString();
|
|
@@ -3316,12 +3316,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la consulta no está registrado', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $systemParamsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $systemParamsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
if(!$systemParamsExists){
|
|
if(!$systemParamsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $paramsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $paramsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
|
|
|
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
@@ -3379,12 +3379,12 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
return $this->responseController->makeResponse(true, 'El usuario que realizó la petición no existe.', [], 404);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $systemParamsExists = file_exists('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $systemParamsExists = file_exists($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
if(!$systemParamsExists){
|
|
if(!$systemParamsExists){
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de parámetros del sistema no fue encontrado.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $paramsStr = file_get_contents('C:\ITTEC\SAM\Dev\SistemaMantenimiento\sistema-mantenimiento-back\storage\app\files\system-params.json');
|
|
|
|
|
|
|
+ $paramsStr = file_get_contents($this->functionsController->getBasePath() .'\storage\app\files\system-params.json');
|
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
$paramsArr = json_decode($paramsStr, true);
|
|
|
|
|
|
|
|
$actualImage = $paramsArr["login_params"]["login_$form[tipo]"];
|
|
$actualImage = $paramsArr["login_params"]["login_$form[tipo]"];
|
|
@@ -3403,7 +3403,7 @@ class SystemAdministratorController extends Controller{
|
|
|
return $this->responseController->makeResponse(true, 'El archivo de la imagen enviada no existe.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'El archivo de la imagen enviada no existe.', [], 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $ubiImgAct = "C:\\ITTEC\\SAM\\Dev\\SistemaMantenimiento\\sistema-mantenimiento-back\\public\\assets\\$actualImage";
|
|
|
|
|
|
|
+ $ubiImgAct = $this->functionsController->getBasePath() . '\public\assets\$actualImage';
|
|
|
if(!file_exists($ubiImgAct)){
|
|
if(!file_exists($ubiImgAct)){
|
|
|
return $this->responseController->makeResponse(true, 'La imagen actual no existe.', [], 500);
|
|
return $this->responseController->makeResponse(true, 'La imagen actual no existe.', [], 500);
|
|
|
}
|
|
}
|
|
@@ -3411,7 +3411,7 @@ class SystemAdministratorController extends Controller{
|
|
|
$now = $this->functionsController->now();
|
|
$now = $this->functionsController->now();
|
|
|
$timestamp = $now->timestamp;
|
|
$timestamp = $now->timestamp;
|
|
|
|
|
|
|
|
- rename($ubiImgAct, "C:\\ITTEC\\SAM\\Dev\\SistemaMantenimiento\\sistema-mantenimiento-back\\public\\assets\\UPDATED_$timestamp.png");
|
|
|
|
|
|
|
+ rename($ubiImgAct, $this->functionsController->getBasePath() . '\public\assets\UPDATED_$timestamp.png');
|
|
|
copy($ubiImgTmp, $ubiImgAct);
|
|
copy($ubiImgTmp, $ubiImgAct);
|
|
|
|
|
|
|
|
$nowStr = $now->toDateTimeString();
|
|
$nowStr = $now->toDateTimeString();
|