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,31 +145,29 @@ class check_filesystem extends \phpbb\install\task_base
|
||||||
// Try to create file if it does not exists
|
// Try to create file if it does not exists
|
||||||
if (!file_exists($path))
|
if (!file_exists($path))
|
||||||
{
|
{
|
||||||
$fp = @fopen($path, 'w');
|
if (!is_resource($fp = @fopen($path, 'w')))
|
||||||
@fclose($fp);
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
$this->filesystem->phpbb_chmod($path,
|
$exists = $writable = false;
|
||||||
\phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE
|
|
||||||
);
|
|
||||||
$exists = true;
|
|
||||||
}
|
}
|
||||||
catch (\phpbb\filesystem\exception\filesystem_exception $e)
|
else
|
||||||
{
|
{
|
||||||
// Do nothing
|
@fclose($fp);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$this->filesystem->phpbb_chmod($path,
|
||||||
|
\phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE
|
||||||
|
);
|
||||||
|
$exists = true;
|
||||||
|
}
|
||||||
|
catch (\phpbb\filesystem\exception\filesystem_exception $e)
|
||||||
|
{
|
||||||
|
$writable = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!$this->filesystem->is_writable($path))
|
||||||
if (file_exists($path))
|
|
||||||
{
|
{
|
||||||
if (!$this->filesystem->is_writable($path))
|
$writable = false;
|
||||||
{
|
|
||||||
$writable = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$exists = $writable = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set_test_passed(($exists && $writable) || $failable);
|
$this->set_test_passed(($exists && $writable) || $failable);
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
to hide visually and `aria-hidden="true"` to hide from screen-readers; using
|
to hide visually and `aria-hidden="true"` to hide from screen-readers; using
|
||||||
`hidden` or `display: none` would prevent the task from running.
|
`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->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()
|
public function test_is_parametrized_false()
|
||||||
|
|
Loading…
Add table
Reference in a new issue