From c48fe65e6f47c09762276baaee24c6b430195612 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Sat, 2 May 2026 09:23:42 +0200 Subject: [PATCH] Fix user agent and a few other things --- admin.php | 2 +- admin/oauth.php | 2 +- admin/photo.php | 2 -- admin/settings.tpl | 12 ++++++------ 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/admin.php b/admin.php index 15c2169..1fe5fe3 100644 --- a/admin.php +++ b/admin.php @@ -1,7 +1,7 @@ setUserAgent(get_root_url()); +$oauth_client_conf->setUserAgent('piwigo/wikimedia-commons-plugin '.get_root_url()); $client = new Client($oauth_client_conf); if (isset($_GET['logout'])) { diff --git a/admin/photo.php b/admin/photo.php index ab1a076..3019418 100644 --- a/admin/photo.php +++ b/admin/photo.php @@ -9,8 +9,6 @@ check_status(ACCESS_ADMINISTRATOR); -include_once(WIKIMEDIACOMMONS_PATH.'vendor/autoload.php'); - $_GET['image_id'] = $_GET['tab']; check_input_parameter( 'image_id', $_GET, false, PATTERN_ID diff --git a/admin/settings.tpl b/admin/settings.tpl index 632d993..29a6001 100644 --- a/admin/settings.tpl +++ b/admin/settings.tpl @@ -5,14 +5,14 @@

{'To do this, first'|translate} - {'go to Meta Wiki to set up a new OAuth consumer'|translate} - with the following permissions: + {'go to Meta Wiki to set up a new OAuth 1.0a consumer'|translate} + with the following grants:

{'Set the callback URL to:'|translate} {$callback_url}

{'Meta Wiki will give you a key and a secret; add these to the form below.'|translate}