mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/15687] Adjust regex for attachment URL
PHPBB3-15687
This commit is contained in:
@@ -86,7 +86,7 @@ class phpbb_functional_acp_attachments_test extends phpbb_functional_test_case
|
|||||||
// Get attach id, the link looks similar to ./download/attachment/3
|
// Get attach id, the link looks similar to ./download/attachment/3
|
||||||
$attach_link = $crawler->filter('span.file-name > a')->attr('href');
|
$attach_link = $crawler->filter('span.file-name > a')->attr('href');
|
||||||
$matches = [];
|
$matches = [];
|
||||||
preg_match('/\/([0-9]+)$/', $attach_link, $matches);
|
preg_match('/\/([0-9]+)\/valid\.jpg$/', $attach_link, $matches);
|
||||||
$attach_id = (int) $matches[1];
|
$attach_id = (int) $matches[1];
|
||||||
|
|
||||||
// Set file time older than 3 hours to consider it orphan
|
// Set file time older than 3 hours to consider it orphan
|
||||||
|
Reference in New Issue
Block a user