| @@ 587-597 (lines=11) @@ | ||
| 584 | $thumbnail_url = Context::getRequestUri() . $thumbnail_file; |
|
| 585 | ||
| 586 | // return false if a size of existing thumbnail file is 0. otherwise return the file path |
|
| 587 | if(file_exists($thumbnail_file)) |
|
| 588 | { |
|
| 589 | if(filesize($thumbnail_file) < 1) |
|
| 590 | { |
|
| 591 | return FALSE; |
|
| 592 | } |
|
| 593 | else |
|
| 594 | { |
|
| 595 | return $thumbnail_url; |
|
| 596 | } |
|
| 597 | } |
|
| 598 | ||
| 599 | // Target file |
|
| 600 | $source_file = NULL; |
|
| @@ 843-847 (lines=5) @@ | ||
| 840 | $thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, $width, $height, $thumbnail_type); |
|
| 841 | $thumbnail_url = Context::getRequestUri().$thumbnail_file; |
|
| 842 | // Return false if thumbnail file exists and its size is 0. Otherwise, return its path |
|
| 843 | if(file_exists($thumbnail_file)) |
|
| 844 | { |
|
| 845 | if(filesize($thumbnail_file)<1) return false; |
|
| 846 | else return $thumbnail_url; |
|
| 847 | } |
|
| 848 | ||
| 849 | // Target File |
|
| 850 | $source_file = null; |
|