mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Removing unnecessary str_replace call.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7780 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
d8ad330bca
commit
1c9b1d0d78
1 changed files with 2 additions and 3 deletions
|
@ -116,7 +116,7 @@ class MediaView extends View {
|
|||
$this->mimeType = array_merge($this->mimeType, $mimeType);
|
||||
}
|
||||
|
||||
if (file_exists($path) && isset($extension) && array_key_exists($extension, $this->mimeType) && connection_status() == 0) {
|
||||
if (file_exists($path) && isset($extension) && isset($this->mimeType[$extension]) && connection_status() == 0) {
|
||||
$chunkSize = 8192;
|
||||
$buffer = '';
|
||||
$fileSize = @filesize($path);
|
||||
|
@ -128,7 +128,7 @@ class MediaView extends View {
|
|||
if (!empty($modified)) {
|
||||
$modified = gmdate('D, d M Y H:i:s', strtotime($modified, time())) . ' GMT';
|
||||
} else {
|
||||
$modified = gmdate('D, d M Y H:i:s') .' GMT';
|
||||
$modified = gmdate('D, d M Y H:i:s') . ' GMT';
|
||||
}
|
||||
|
||||
if ($download) {
|
||||
|
@ -148,7 +148,6 @@ class MediaView extends View {
|
|||
$httpRange = env('HTTP_RANGE');
|
||||
if (isset($httpRange)) {
|
||||
list($toss, $range) = explode('=', $httpRange);
|
||||
str_replace($range, '-', $range);
|
||||
|
||||
$size = $fileSize - 1;
|
||||
$length = $fileSize - $range;
|
||||
|
|
Loading…
Reference in a new issue