@@ 708-710 (lines=3) @@ | ||
705 | $h403 = 'HTTP/1.x 403 Access Denied'; |
|
706 | $h404 = 'HTTP/1.x 404 Not Found'; |
|
707 | ||
708 | if (($volume = $this->volume($target)) == false) { |
|
709 | return array('error' => 'File not found', 'header' => $h404, 'raw' => true); |
|
710 | } |
|
711 | ||
712 | if (($file = $volume->file($target)) == false) { |
|
713 | return array('error' => 'File not found', 'header' => $h404, 'raw' => true); |
|
@@ 712-714 (lines=3) @@ | ||
709 | return array('error' => 'File not found', 'header' => $h404, 'raw' => true); |
|
710 | } |
|
711 | ||
712 | if (($file = $volume->file($target)) == false) { |
|
713 | return array('error' => 'File not found', 'header' => $h404, 'raw' => true); |
|
714 | } |
|
715 | ||
716 | if (!$file['read']) { |
|
717 | return array('error' => 'Access denied', 'header' => $h403, 'raw' => true); |
|
@@ 720-722 (lines=3) @@ | ||
717 | return array('error' => 'Access denied', 'header' => $h403, 'raw' => true); |
|
718 | } |
|
719 | ||
720 | if (($fp = $volume->open($target)) == false) { |
|
721 | return array('error' => 'File not found', 'header' => $h404, 'raw' => true); |
|
722 | } |
|
723 | ||
724 | if ($download) { |
|
725 | $disp = 'attachment'; |