From 1e64d745a2669e90ac97ab4a89b6ee2a12874a6c Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 23 Mar 2022 12:03:09 +0100 Subject: [PATCH] issue #1467 avoid error when Piwigo version is not available on PEM * do not display an error message "cannot connect to server" but simply "no plugin available" * if we are on a beta/RC version, display a button to switch to test plugins compatible with Piwigo previous version * add a tooltip with more details about the "show beta test plugins" --- admin/include/plugins.class.php | 2 +- admin/plugins_new.php | 5 +++++ admin/themes/default/template/plugins_new.tpl | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php index 23e9b326e..313f3624f 100644 --- a/admin/include/plugins.class.php +++ b/admin/include/plugins.class.php @@ -447,7 +447,7 @@ DELETE FROM '. PLUGINS_TABLE .' $versions_to_check = $this->get_versions_to_check($beta_test); if (empty($versions_to_check)) { - return false; + return true; } // Plugins to check diff --git a/admin/plugins_new.php b/admin/plugins_new.php index a02c2415e..a3e3447bf 100644 --- a/admin/plugins_new.php +++ b/admin/plugins_new.php @@ -181,5 +181,10 @@ else $page['errors'][] = l10n('Can\'t connect to server.'); } +if (!$beta_test and preg_match('/(beta|RC)/', PHPWG_VERSION)) +{ + $template->assign('BETA_URL', $base_url.'&beta-test=true'); +} + $template->assign_var_from_handle('ADMIN_CONTENT', 'plugins'); ?> \ No newline at end of file diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl index cf6d3cf3a..d61499cb9 100644 --- a/admin/themes/default/template/plugins_new.tpl +++ b/admin/themes/default/template/plugins_new.tpl @@ -32,7 +32,7 @@ const str_from_begining = "{"since the beginning"|@translate}";
-
+
{else} -

{'There is no other plugin available.'|@translate}

+

{'There is no other plugin available.'|@translate} +{if isset($BETA_URL)} + {'Show beta test plugins'|@translate} +{/if} +

{/if} \ No newline at end of file