diff options
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 27 | 
1 files changed, 18 insertions, 9 deletions
| diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index a0e2a46f54..c423e29d9d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */ @@ -428,7 +432,7 @@ function phpbb_version_compare($version1, $version2, $operator = null)  * @param int	$perms		Permissions to set  *  * @return bool	true on success, otherwise false -* @author faw, phpBB Group +* @author faw, phpBB Limited  */  function phpbb_chmod($filename, $perms = CHMOD_READ)  { @@ -3847,7 +3851,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)  			echo '	</div>';  			echo '	</div>';  			echo '	<div id="page-footer">'; -			echo '		Powered by <a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'; +			echo '		Powered by <a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited';  			echo '	</div>';  			echo '</div>';  			echo '</body>'; @@ -4974,7 +4978,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =  		'T_UPLOAD_PATH'			=> "{$web_path}{$config['upload_path']}/",  		'T_STYLESHEET_LINK'		=> "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],  		'T_STYLESHEET_LANG_LINK'    => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'], -		'T_JQUERY_LINK'			=> !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], +		'T_JQUERY_LINK'			=> !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.min.js?assets_version=" . $config['assets_version'],  		'S_ALLOW_CDN'			=> !empty($config['allow_cdn']),  		'T_THEME_NAME'			=> rawurlencode($user->style['style_path']), @@ -5088,14 +5092,14 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =  	$template->assign_vars(array(  		'DEBUG_OUTPUT'			=> (defined('DEBUG')) ? $debug_output : '',  		'TRANSLATION_INFO'		=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', -		'CREDIT_LINE'			=> $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'), +		'CREDIT_LINE'			=> $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited'),  		'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id) : '')  	);  	// Call cron-type script  	$call_cron = false; -	if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot']) +	if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('cron.lock_check'))  	{  		$call_cron = true;  		$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time(); @@ -5116,7 +5120,8 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =  	// Call cron job?  	if ($call_cron)  	{ -		global $cron; +		global $phpbb_container; +		$cron = $phpbb_container->get('cron.manager');  		$task = $cron->find_one_ready_task();  		if ($task) @@ -5124,6 +5129,10 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =  			$url = $task->get_url();  			$template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />');  		} +		else +		{ +			$cache->put('cron.lock_check', true, 300); +		}  	}  	if ($display_template) | 
