mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
issue #1827 new check on filesystem compared to what is listed in the database
While not fixing issue #1827 it helps users to detect if they have been affected by the problem.
This commit is contained in:
@@ -29,6 +29,31 @@ check_status(ACCESS_ADMINISTRATOR);
|
||||
check_input_parameter('page', $_GET, false, '/^[a-zA-Z\d_-]+$/');
|
||||
check_input_parameter('section', $_GET, false, '/^[a-z]+[a-z_\/-]*(\.php)?$/i');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Filesystem checks |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if ($conf['fs_quick_check_period'] > 0)
|
||||
{
|
||||
$perform_fsqc = false;
|
||||
if (isset($conf['fs_quick_check_last_check']))
|
||||
{
|
||||
if (strtotime($conf['fs_quick_check_last_check']) < strtotime($conf['fs_quick_check_period'].' seconds ago'))
|
||||
{
|
||||
$perform_fsqc = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$perform_fsqc = true;
|
||||
}
|
||||
|
||||
if ($perform_fsqc)
|
||||
{
|
||||
fs_quick_check();
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Direct actions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user