mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 06:55:25 +02:00
Merge branch 'develop-ascraeus' into develop
This commit is contained in:
commit
5426e9c700
@ -5254,7 +5254,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
|||||||
|
|
||||||
// Call cron-type script
|
// Call cron-type script
|
||||||
$call_cron = false;
|
$call_cron = false;
|
||||||
if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('cron.lock_check'))
|
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;
|
$call_cron = true;
|
||||||
$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();
|
$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();
|
||||||
@ -5286,7 +5286,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cache->put('cron.lock_check', true, 300);
|
$cache->put('_cron.lock_check', true, 60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ class local extends \phpbb\avatar\driver\driver
|
|||||||
*/
|
*/
|
||||||
protected function get_avatar_list($user)
|
protected function get_avatar_list($user)
|
||||||
{
|
{
|
||||||
$avatar_list = ($this->cache == null) ? false : $this->cache->get('avatar_local_list');
|
$avatar_list = ($this->cache == null) ? false : $this->cache->get('_avatar_local_list');
|
||||||
|
|
||||||
if ($avatar_list === false)
|
if ($avatar_list === false)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ class local extends \phpbb\avatar\driver\driver
|
|||||||
|
|
||||||
if ($this->cache != null)
|
if ($this->cache != null)
|
||||||
{
|
{
|
||||||
$this->cache->put('avatar_local_list', $avatar_list, 86400);
|
$this->cache->put('_avatar_local_list', $avatar_list, 86400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ class manager
|
|||||||
*/
|
*/
|
||||||
public function find_one_ready_task()
|
public function find_one_ready_task()
|
||||||
{
|
{
|
||||||
|
shuffle($this->tasks);
|
||||||
foreach ($this->tasks as $task)
|
foreach ($this->tasks as $task)
|
||||||
{
|
{
|
||||||
if ($task->is_ready())
|
if ($task->is_ready())
|
||||||
|
@ -239,7 +239,7 @@ class version_helper
|
|||||||
*/
|
*/
|
||||||
public function get_versions($force_update = false, $force_cache = false)
|
public function get_versions($force_update = false, $force_cache = false)
|
||||||
{
|
{
|
||||||
$cache_file = 'versioncheck_' . $this->host . $this->path . $this->file;
|
$cache_file = '_versioncheck_' . $this->host . $this->path . $this->file;
|
||||||
|
|
||||||
$info = $this->cache->get($cache_file);
|
$info = $this->cache->get($cache_file);
|
||||||
|
|
||||||
|
@ -129,8 +129,8 @@ class phpbb_functional_prune_shadow_topic_test extends phpbb_functional_test_cas
|
|||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
|
|
||||||
$crawler = self::request('GET', "viewforum.php?f={$this->data['forums']['Prune Shadow']}&sid={$this->sid}");
|
$crawler = self::request('GET', "viewforum.php?f={$this->data['forums']['Prune Shadow']}&sid={$this->sid}");
|
||||||
$cron_link = $crawler->filter('img')->last()->attr('src');
|
$this->assertNotEmpty($crawler->filter('img')->last()->attr('src'));
|
||||||
$crawler = self::request('GET', $cron_link . "&sid={$this->sid}", array(), false);
|
self::request('GET', "cron.php?cron_type=cron.task.core.prune_shadow_topics&f={$this->data['forums']['Prune Shadow']}&sid={$this->sid}", array(), false);
|
||||||
|
|
||||||
$this->assert_forum_details($this->data['forums']['Prune Shadow'], array(
|
$this->assert_forum_details($this->data['forums']['Prune Shadow'], array(
|
||||||
'forum_posts_approved' => 0,
|
'forum_posts_approved' => 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user