aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorDerky <derky@phpbb.com>2016-12-09 20:03:00 +0100
committerDerky <derky@phpbb.com>2016-12-09 20:03:00 +0100
commita2793f24b1b4394871e897679fd407ba703d1937 (patch)
tree340b3408710c54fae16f98c7792b7e028d54fb80 /phpBB
parent467e6035700bd1bb5e6f3aef803b9de617dcd4ee (diff)
downloadforums-a2793f24b1b4394871e897679fd407ba703d1937.tar
forums-a2793f24b1b4394871e897679fd407ba703d1937.tar.gz
forums-a2793f24b1b4394871e897679fd407ba703d1937.tar.bz2
forums-a2793f24b1b4394871e897679fd407ba703d1937.tar.xz
forums-a2793f24b1b4394871e897679fd407ba703d1937.zip
[ticket/14901] Remove notice for extension without version check
Extensions without version check should not display a notice on the details page in the ACP. PHPBB3-14901
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_ext_details.html24
-rw-r--r--phpBB/includes/acp/acp_extensions.php40
2 files changed, 35 insertions, 29 deletions
diff --git a/phpBB/adm/style/acp_ext_details.html b/phpBB/adm/style/acp_ext_details.html
index 830c2e3cb4..4c1feb59a9 100644
--- a/phpBB/adm/style/acp_ext_details.html
+++ b/phpBB/adm/style/acp_ext_details.html
@@ -7,19 +7,17 @@
<h1>{L_EXTENSIONS_ADMIN}</h1>
<!-- IF S_VERSIONCHECK -->
- <div class="<!-- IF S_UP_TO_DATE -->successbox<!-- ELSE -->errorbox<!-- ENDIF -->">
- <p>{UP_TO_DATE_MSG} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
- </div>
- <!-- ELSE IF S_VERSIONCHECK_STATUS == 0 -->
- <div class="errorbox notice">
- <p>{L_VERSIONCHECK_FAIL}</p>
- <p>{VERSIONCHECK_FAIL_REASON}</p>
- <p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
- </div>
- <!-- ELSE IF S_VERSIONCHECK_STATUS == 1 -->
- <div class="errorbox notice">
- <p>{VERSIONCHECK_FAIL_REASON}</p>
- </div>
+ <!-- IF S_VERSIONCHECK_FAIL -->
+ <div class="errorbox notice">
+ <p>{L_VERSIONCHECK_FAIL}</p>
+ <p>{VERSIONCHECK_FAIL_REASON}</p>
+ <p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
+ </div>
+ <!-- ELSE -->
+ <div class="<!-- IF S_UP_TO_DATE -->successbox<!-- ELSE -->errorbox<!-- ENDIF -->">
+ <p>{UP_TO_DATE_MSG} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
+ </div>
+ <!-- ENDIF -->
<!-- ENDIF -->
<fieldset>
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index e081eae975..e915fa8c75 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -308,29 +308,37 @@ class acp_extensions
// Output it to the template
$md_manager->output_template_data($template);
- try
+ $meta = $md_manager->get_metadata('all');
+ if (isset($meta['extra']['version-check']))
{
- $updates_available = $phpbb_extension_manager->version_check($md_manager, $request->variable('versioncheck_force', false), $this->config['extension_force_unstable'] ? 'unstable' : null);
+ try
+ {
+ $updates_available = $phpbb_extension_manager->version_check($md_manager, $request->variable('versioncheck_force', false), $this->config['extension_force_unstable'] ? 'unstable' : null);
- $template->assign_vars(array(
- 'S_UP_TO_DATE' => empty($updates_available),
- 'S_VERSIONCHECK' => true,
- 'UP_TO_DATE_MSG' => $this->user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', $md_manager->get_metadata('display-name')),
- ));
+ $template->assign_vars(array(
+ 'S_UP_TO_DATE' => empty($updates_available),
+ 'UP_TO_DATE_MSG' => $this->user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', $md_manager->get_metadata('display-name')),
+ ));
- foreach ($updates_available as $branch => $version_data)
+ foreach ($updates_available as $branch => $version_data)
+ {
+ $template->assign_block_vars('updates_available', $version_data);
+ }
+ }
+ catch (exception_interface $e)
{
- $template->assign_block_vars('updates_available', $version_data);
+ $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
+
+ $template->assign_vars(array(
+ 'S_VERSIONCHECK_FAIL' => true,
+ 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== 'VERSIONCHECK_FAIL') ? $message : '',
+ ));
}
+ $template->assign_var('S_VERSIONCHECK', true);
}
- catch (exception_interface $e)
+ else
{
- $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
-
- $template->assign_vars(array(
- 'S_VERSIONCHECK_STATUS' => $e->getCode(),
- 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== 'VERSIONCHECK_FAIL') ? $message : '',
- ));
+ $template->assign_var('S_VERSIONCHECK', false);
}
$template->assign_vars(array(