GX-Bug #55945 » DeleteProductImagesFix.patch
| src/admin/gm_miscellaneous.php (date 1522227561000) | ||
|---|---|---|
| 48 | 48 |
$gm_images_count = 0; |
| 49 | 49 |
while (false !== ($gm_file = readdir($gm_handle))) |
| 50 | 50 |
{
|
| 51 |
if($gm_file != '.' && $gm_file != '..' && $gm_file != 'index.html') |
|
| 51 |
if(is_file(DIR_FS_CATALOG_ORIGINAL_IMAGES . $gm_file) && $gm_file != '.' && $gm_file != '..' && $gm_file != 'index.html')
|
|
| 52 | 52 |
{
|
| 53 | 53 |
if(@unlink(DIR_FS_CATALOG_ORIGINAL_IMAGES . $gm_file)) |
| 54 | 54 |
{
|
| ... | ... | |
| 94 | 94 |
{
|
| 95 | 95 |
while(false !== ($gm_file = readdir($gm_handle))) |
| 96 | 96 |
{
|
| 97 |
if($gm_file != '.' && $gm_file != '..' && $gm_file != 'index.html' |
|
| 97 |
if(is_file($dir . $gm_file) && $gm_file != '.' && $gm_file != '..' && $gm_file != 'index.html'
|
|
| 98 | 98 |
&& !in_array($gm_file, $usedImages) |
| 99 | 99 |
) |
| 100 | 100 |
{
|