From d53391ef5a7414bf607c2e865ab32100b8c1ec33 Mon Sep 17 00:00:00 2001 From: Max Nuding Date: Tue, 4 Jul 2023 11:22:34 +0200 Subject: [PATCH] Add base url config --- .nova/Configuration.json | 5 ++ composer.lock | 33 +++++----- config.php.sample | 11 ++-- index.php | 52 ++++++++------- results-gallery.php | 2 +- src/API/PhotoPrism.php | 134 ++++++++++++++++++++++++--------------- src/Entities/Album.php | 9 ++- vote-gallery.php | 2 +- 8 files changed, 148 insertions(+), 100 deletions(-) diff --git a/.nova/Configuration.json b/.nova/Configuration.json index fef0c74..e7ec918 100644 --- a/.nova/Configuration.json +++ b/.nova/Configuration.json @@ -1,4 +1,9 @@ { + "com.thorlaksson.phpcs.formatOnSave" : true, + "com.thorlaksson.phpcs.runOnChange" : "onSave", + "com.thorlaksson.phpcs.standard" : "PSR2", + "prettier.default-config.tabWidth" : 4, + "prettier.format-on-save" : "Disable", "workspace.art_style" : 0, "workspace.name" : "PhotoPrismUpload", "workspace.preview_type" : "custom", diff --git a/composer.lock b/composer.lock index e7ff0af..8a7717b 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "monolog/monolog", - "version": "2.5.0", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4192345e260f1d51b365536199744b987e160edc" + "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", - "reference": "4192345e260f1d51b365536199744b987e160edc", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", "shasum": "" }, "require": { @@ -30,18 +30,22 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", - "graylog2/gelf-php": "^1.4.2", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", + "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", + "phpunit/phpunit": "^8.5.14", + "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": ">=0.90@dev", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -56,7 +60,6 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -91,7 +94,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.5.0" + "source": "https://github.com/Seldaek/monolog/tree/2.9.1" }, "funding": [ { @@ -103,7 +106,7 @@ "type": "tidelift" } ], - "time": "2022-04-08T15:43:54+00:00" + "time": "2023-02-06T13:44:46+00:00" }, { "name": "psr/log", diff --git a/config.php.sample b/config.php.sample index 3987f94..20a5bfc 100644 --- a/config.php.sample +++ b/config.php.sample @@ -1,9 +1,10 @@ '', - 'password' => '' - 'noAlbumToken' => '', - 'fileUploadLimitMb' => 1024, - 'maximumNumberOfFilesPerUpload' => 200 + 'username' => '', + 'password' => '', + 'noAlbumToken' => '', + 'fileUploadLimitMb' => 1024, + 'maximumNumberOfFilesPerUpload' => 200, + 'baseUrl' => 'https://rabenberger.photos', ]; diff --git a/index.php b/index.php index 8eddece..f8a27c2 100644 --- a/index.php +++ b/index.php @@ -8,8 +8,9 @@ use PhotoPrismUpload\API\PhotoPrism; use PhotoPrismUpload\Entities\Album; /** @var string $footer Footer text which links to the Gitea repo */ -$footer = ''; +$footer = + ''; ?> @@ -105,9 +106,8 @@ $footer = '