mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 04:18:55 +00:00
Compare commits
8 commits
8692e53916
...
0eb40a16e1
Author | SHA1 | Date | |
---|---|---|---|
|
0eb40a16e1 | ||
|
954bc07de1 | ||
|
044536dffb | ||
|
6ccc6f0383 | ||
|
4f10e6e212 | ||
|
3b03f3a8f9 | ||
|
e47ba9e81d | ||
|
8d016bafa2 |
3 changed files with 19 additions and 21 deletions
|
@ -145,7 +145,12 @@ class check_filesystem extends \phpbb\install\task_base
|
|||
// Try to create file if it does not exists
|
||||
if (!file_exists($path))
|
||||
{
|
||||
$fp = @fopen($path, 'w');
|
||||
if (!is_resource($fp = @fopen($path, 'w')))
|
||||
{
|
||||
$exists = $writable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@fclose($fp);
|
||||
try
|
||||
{
|
||||
|
@ -155,21 +160,14 @@ class check_filesystem extends \phpbb\install\task_base
|
|||
$exists = true;
|
||||
}
|
||||
catch (\phpbb\filesystem\exception\filesystem_exception $e)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists($path))
|
||||
{
|
||||
if (!$this->filesystem->is_writable($path))
|
||||
{
|
||||
$writable = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else if (!$this->filesystem->is_writable($path))
|
||||
{
|
||||
$exists = $writable = false;
|
||||
$writable = false;
|
||||
}
|
||||
|
||||
$this->set_test_passed(($exists && $writable) || $failable);
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
to hide visually and `aria-hidden="true"` to hide from screen-readers; using
|
||||
`hidden` or `display: none` would prevent the task from running.
|
||||
#}
|
||||
<img class="sr-only" aria-hidden="true" src="{{ CRON_TASK_URL|e('url') }}" width="1" height="1" alt="">
|
||||
<img class="sr-only" aria-hidden="true" src="{{ CRON_TASK_URL|e('html_attr') }}" width="1" height="1" alt="">
|
||||
|
|
|
@ -60,7 +60,7 @@ class phpbb_cron_wrapper_test extends phpbb_template_template_test_case
|
|||
$this->template
|
||||
);
|
||||
|
||||
$this->assertEquals('<img class="sr-only" aria-hidden="true" src="app.php%2Fcron%2Ffoo%3Ff%3D5" width="1" height="1" alt="">', str_replace(["\n", "\t"], '', $this->wrapper->get_html_tag()));
|
||||
$this->assertEquals('<img class="sr-only" aria-hidden="true" src="app.php/cron/foo?f=5" width="1" height="1" alt="">', str_replace(["\n", "\t"], '', $this->wrapper->get_html_tag()));
|
||||
}
|
||||
|
||||
public function test_is_parametrized_false()
|
||||
|
|
Loading…
Add table
Reference in a new issue