summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/file_proxy.php
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2012-12-09 10:01:43 +0100
committerBharat Mediratta <bharat@menalto.com>2012-12-10 11:15:02 -0800
commit549630219f8f43abab68f1e63944facedfabe776 (patch)
tree3027e26c5767a87ecd1cffd3ce5ac23c00d902f2 /modules/gallery/controllers/file_proxy.php
parentde101829d1f79742bec7a8e1afa01eb416dda211 (diff)
bug fix: updated file_proxy.php to use legal_file helper instead of hard-coded list of movie file extensions.
bug fix: updated uploader.php to use legal_file helper instead of hard-coded list of movie file extensions. Fixes #1926
Diffstat (limited to 'modules/gallery/controllers/file_proxy.php')
-rw-r--r--modules/gallery/controllers/file_proxy.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php
index 49aa9c5a..b9ff7df1 100644
--- a/modules/gallery/controllers/file_proxy.php
+++ b/modules/gallery/controllers/file_proxy.php
@@ -68,10 +68,10 @@ class File_Proxy_Controller extends Controller {
$item = item::find_by_path($path);
if (!$item->loaded()) {
// We didn't turn it up. If we're looking for a .jpg then it's it's possible that we're
- // requesting the thumbnail for a movie. In that case, the .flv, .mp4 or .m4v file would
+ // requesting the thumbnail for a movie. In that case, the movie file would
// have been converted to a .jpg. So try some alternate types:
if (preg_match('/.jpg$/', $path)) {
- foreach (array("flv", "mp4", "m4v") as $ext) {
+ foreach (legal_file::get_movie_extensions() as $ext) {
$movie_path = preg_replace('/.jpg$/', ".$ext", $path);
$item = item::find_by_path($movie_path);
if ($item->loaded()) {