From 45635467eeab3dc57ff031fe80daba3f5373096c Mon Sep 17 00:00:00 2001 From: Yukimi Kazari Date: Wed, 4 Jan 2017 04:49:27 -0500 Subject: [PATCH] Revert "Added more MP4 Suport" This reverts commit 2c7df929c20ea8198d4fcf09ede5b14346c8cb89 --- app/models/Post/ImageStore/Base.php | 4 ++-- app/models/Post/ImageStore/LocalFlat.php | 4 ++-- app/models/Post/ImageStore/LocalHierarchy.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/Post/ImageStore/Base.php b/app/models/Post/ImageStore/Base.php index c7501d0..1d718bd 100755 --- a/app/models/Post/ImageStore/Base.php +++ b/app/models/Post/ImageStore/Base.php @@ -43,7 +43,7 @@ abstract class Post_ImageStore_Base { if (is_file($this->file_path())) @unlink($this->file_path()); - if ($this->_post->image() or $this->_post->video()) { + if ($this->_post->image()) { if (file_exists($this->preview_path())) @unlink($this->preview_path()); if (file_exists($this->sample_path())) @@ -64,7 +64,7 @@ abstract class Post_ImageStore_Base // chmod($this->file_path(), 0777); - if ($this->_post->image() or $this->_post->video()) { + if ($this->_post->image()) { $this->_create_dirs($this->preview_path()); rename($this->_post->tempfile_preview_path(), $this->preview_path()); // chmod($this->preview_path(), 0777); diff --git a/app/models/Post/ImageStore/LocalFlat.php b/app/models/Post/ImageStore/LocalFlat.php index 7188b06..c0f846a 100755 --- a/app/models/Post/ImageStore/LocalFlat.php +++ b/app/models/Post/ImageStore/LocalFlat.php @@ -16,7 +16,7 @@ class Post_ImageStore_LocalFlat extends Post_ImageStore_Base public function preview_path() { - if ($this->_post->image() or $this->_post->video()) + if ($this->_post->image()) return Rails::root() . "/public/data/preview/".$this->_post->md5.".jpg"; else return Rails::root() . "/public/download-preview.png"; @@ -31,7 +31,7 @@ class Post_ImageStore_LocalFlat extends Post_ImageStore_Base { if ($this->_post->status == "deleted") return CONFIG()->url_base . "/deleted-preview.png"; - elseif ($this->_post->image() or $this->_post->video()) + elseif ($this->_post->image()) return CONFIG()->url_base . "/data/preview/".$this->_post->md5.".jpg"; else return CONFIG()->url_base . "/download-preview.png"; diff --git a/app/models/Post/ImageStore/LocalHierarchy.php b/app/models/Post/ImageStore/LocalHierarchy.php index ce40247..ec7c090 100755 --- a/app/models/Post/ImageStore/LocalHierarchy.php +++ b/app/models/Post/ImageStore/LocalHierarchy.php @@ -16,7 +16,7 @@ class Post_ImageStore_LocalHierarchy extends Post_ImageStore_Base public function preview_path() { - if ($this->_post->image() or $this->_post->video()) + if ($this->_post->image()) return Rails::root() . "/public/data/preview/" . $this->_file_hierarchy() . "/" .$this->_post->md5.".jpg"; else return Rails::root() . "/public/download-preview.png"; @@ -31,7 +31,7 @@ class Post_ImageStore_LocalHierarchy extends Post_ImageStore_Base { if ($this->_post->status == "deleted") return CONFIG()->url_base . "/deleted-preview.png"; - elseif ($this->_post->image() or $this->_post->video()) + elseif ($this->_post->image()) return CONFIG()->url_base . "/data/preview/".$this->_post->md5.".jpg"; else return CONFIG()->url_base . "/download-preview.png";