diff options
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
| -rw-r--r-- | phpBB/includes/acp/acp_main.php | 29 | 
1 files changed, 19 insertions, 10 deletions
| diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index f6d728ffed..afa0f1ea61 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -429,20 +429,28 @@ class acp_main  			));  		} -		$version_helper = $phpbb_container->get('version_helper'); -		try +		if ($auth->acl_get('a_board'))  		{ -			$recheck = $request->variable('versioncheck_force', false); -			$updates_available = $version_helper->get_suggested_updates($recheck); +			$version_helper = $phpbb_container->get('version_helper'); +			try +			{ +				$recheck = $request->variable('versioncheck_force', false); +				$updates_available = $version_helper->get_suggested_updates($recheck); -			$template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available)); +				$template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available)); +			} +			catch (\RuntimeException $e) +			{ +				$template->assign_vars(array( +					'S_VERSIONCHECK_FAIL'		=> true, +					'VERSIONCHECK_FAIL_REASON'	=> ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '', +				)); +			}  		} -		catch (\RuntimeException $e) +		else  		{ -			$template->assign_vars(array( -				'S_VERSIONCHECK_FAIL'		=> true, -				'VERSIONCHECK_FAIL_REASON'	=> ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '', -			)); +			// We set this template var to true, to not display an outdated version notice. +			$template->assign_var('S_VERSION_UP_TO_DATE', true);  		}  		/** @@ -553,6 +561,7 @@ class acp_main  			'U_VERSIONCHECK'	=> append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'),  			'U_VERSIONCHECK_FORCE'	=> append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'), +			'S_VERSIONCHECK'	=> ($auth->acl_get('a_board')) ? true : false,  			'S_ACTION_OPTIONS'	=> ($auth->acl_get('a_board')) ? true : false,  			'S_FOUNDER'			=> ($user->data['user_type'] == USER_FOUNDER) ? true : false,  			) | 
