formatting

This commit is contained in:
Denis Duliçi
2020-07-06 17:23:22 +03:00
parent eca4588780
commit 7617b796de

View File

@ -317,7 +317,7 @@ trait Modules
$file = $response->getBody()->getContents();
$path = 'temp-' . md5(mt_rand());
$temp_path = storage_path('app/temp') . '/' . $path;
$temp_path = storage_path('app/temp/' . $path);
$file_path = $temp_path . '/upload.zip';
@ -359,7 +359,7 @@ trait Modules
];
}
$temp_path = storage_path('app/temp') . '/' . $path;
$temp_path = storage_path('app/temp/' . $path);
$file = $temp_path . '/upload.zip';
@ -394,18 +394,9 @@ trait Modules
public function installModule($path)
{
if (empty($path)) {
return [
'success' => false,
'error' => true,
'message' => trans('modules.errors.finish', ['module' => '']),
'data' => null,
];
}
$temp_path = storage_path('app/temp/' . $path);
$temp_path = storage_path('app/temp') . '/' . $path;
if (!is_file($temp_path . '/module.json')) {
if (empty($path) || !is_file($temp_path . '/module.json')) {
return [
'success' => false,
'error' => true,