summaryrefslogtreecommitdiff
path: root/core/helpers/movie.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-04-08 15:11:55 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-04-08 15:11:55 +0000
commit523c467eed670c59580ede2ab1dbe8b4ad59c800 (patch)
tree149ee450f7430c5f2fb34ff6e3143865cf5cce54 /core/helpers/movie.php
parentb6f59e17f1a7f5627eea807dcd049bbc6242d3e6 (diff)
Fixes issues with Server Add:
1) Fixes Ticket #208 2) Fixes Ticket #190 3) Fixes an unticketed issue where two items could collide when creating the thumbnail and/or resize. For example, loading a.flv and a.jpg would have generated the same thumbnail image. This change adds a random value to the name to avoid conflicts. 4) Added item::__set() to clear the relative path if the name changes
Diffstat (limited to 'core/helpers/movie.php')
-rw-r--r--core/helpers/movie.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/helpers/movie.php b/core/helpers/movie.php
index 658bc185..7ec4c2e0 100644
--- a/core/helpers/movie.php
+++ b/core/helpers/movie.php
@@ -79,7 +79,8 @@ class movie_Core {
$movie->add_to_parent($parent);
// If the thumb or resize already exists then rename it
- if (file_exists($movie->resize_path()) || file_exists($movie->thumb_path())) {
+ if (file_exists($movie->resize_path()) ||
+ file_exists($movie->thumb_path())) {
$movie->name = $pi["filename"] . "-" . rand() . "." . $pi["extension"];
$movie->save();
}