Skip to content

Commit

Permalink
auto fixes + some impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Eichhorn committed Jan 26, 2024
1 parent 41e7b22 commit cbd7fd1
Show file tree
Hide file tree
Showing 29 changed files with 320 additions and 300 deletions.
4 changes: 2 additions & 2 deletions Admin/Install/Navigation.install.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
},
{
"id": 1000410001,
"pid": "/profile/single",
"pid": "/profile/view",
"type": 2,
"subtype": 2,
"name": "Media",
"uri": "{/base}/profile/single/media?{?}",
"uri": "{/base}/profile/view/media?{?}",
"target": "self",
"icon": null,
"order": 3,
Expand Down
13 changes: 6 additions & 7 deletions Admin/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use phpOMS\System\File\Local\Directory;
use phpOMS\System\File\Local\File;
use phpOMS\System\File\PathException;
use phpOMS\Uri\HttpUri;

/**
* Installer class.
Expand Down Expand Up @@ -174,7 +173,7 @@ private static function createReference(ApplicationAbstract $app, array $data) :
$module = $app->moduleManager->getModuleInstance('Media');

$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request = new HttpRequest();

$request->header->account = 1;
$request->setData('name', $data['name'] ?? '');
Expand Down Expand Up @@ -211,7 +210,7 @@ private static function createCollection(ApplicationAbstract $app, array $data)
$path = isset($data['path']) ? ($data['path']) : $data['virtualPath'] ?? '';

$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request = new HttpRequest();

$request->header->account = 1;
$request->setData('name', $data['name'] ?? '');
Expand Down Expand Up @@ -247,7 +246,7 @@ private static function createType(ApplicationAbstract $app, array $data) : arra
$module = $app->moduleManager->get('Media');

$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request = new HttpRequest();

$request->header->account = 1;
$request->setData('name', $data['name'] ?? '');
Expand Down Expand Up @@ -275,7 +274,7 @@ private static function createType(ApplicationAbstract $app, array $data) : arra
}

$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request = new HttpRequest();

$request->header->account = 1;
$request->setData('title', $l11n['title'] ?? '');
Expand Down Expand Up @@ -306,7 +305,7 @@ private static function uploadMedia(ApplicationAbstract $app, array $data) : arr
$module = $app->moduleManager->get('Media');

$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request = new HttpRequest();

$request->header->account = 1;
$request->setData('path', empty($data['path'] ?? '') ? '' : $data['path']);
Expand Down Expand Up @@ -364,7 +363,7 @@ private static function uploadMedia(ApplicationAbstract $app, array $data) : arr

if ($data['create_collection'] ?? false) {
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request = new HttpRequest();

$request->header->account = 1;
$request->setData('name', (string) ($data['name'] ?? ''));
Expand Down
12 changes: 6 additions & 6 deletions Admin/Routes/Web/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
],
],
'^.*/media/list.*$' => [
'^.*/media/list(\?.*$|$)' => [
[
'dest' => '\Modules\Media\Controller\BackendController:viewMediaList',
'verb' => RouteVerb::GET,
Expand All @@ -40,7 +40,7 @@
],
],
],
'^.*/media/upload.*$' => [
'^.*/media/upload(\?.*$|$)' => [
[
'dest' => '\Modules\Media\Controller\BackendController:viewMediaUpload',
'verb' => RouteVerb::GET,
Expand All @@ -51,7 +51,7 @@
],
],
],
'^.*/media/file/create.*$' => [
'^.*/media/file/create(\?.*$|$)' => [
[
'dest' => '\Modules\Media\Controller\BackendController:viewMediaFileCreate',
'verb' => RouteVerb::GET,
Expand All @@ -62,7 +62,7 @@
],
],
],
'^.*/media/collection/create.*$' => [
'^.*/media/collection/create(\?.*$|$)' => [
[
'dest' => '\Modules\Media\Controller\BackendController:viewMediaCollectionCreate',
'verb' => RouteVerb::GET,
Expand All @@ -73,9 +73,9 @@
],
],
],
'^.*/media/single.*$' => [
'^.*/media/view(\?.*$|$)' => [
[
'dest' => '\Modules\Media\Controller\BackendController:viewMediaSingle',
'dest' => '\Modules\Media\Controller\BackendController:viewMediaView',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
Expand Down
Loading

0 comments on commit cbd7fd1

Please sign in to comment.