mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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"
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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');
|
||||
?>
|
||||
@@ -32,7 +32,7 @@ const str_from_begining = "{"since the beginning"|@translate}";
|
||||
<div class="titrePage">
|
||||
<div class="sort">
|
||||
<div class="sort-actions">
|
||||
<div class="beta-test-plugin-switch">
|
||||
<div class="beta-test-plugin-switch tiptip" title="{'Show plugins compatible with previous version of Piwigo'|translate|escape:html}">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="showBetaTestPlugin" {if $BETA_TEST}checked{/if}>
|
||||
<span class="slider round"></span>
|
||||
@@ -208,5 +208,9 @@ const str_from_begining = "{"since the beginning"|@translate}";
|
||||
{/foreach}
|
||||
</div>
|
||||
{else}
|
||||
<p>{'There is no other plugin available.'|@translate}</p>
|
||||
<p>{'There is no other plugin available.'|@translate}
|
||||
{if isset($BETA_URL)}
|
||||
<a href="{$BETA_URL}" class="buttonLike icon-fire">{'Show beta test plugins'|@translate}</a>
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user