summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/admin_theme_options.php2
-rw-r--r--modules/gallery/controllers/file_proxy.php20
2 files changed, 2 insertions, 20 deletions
diff --git a/modules/gallery/controllers/admin_theme_options.php b/modules/gallery/controllers/admin_theme_options.php
index aead8bae..38d2b0a8 100644
--- a/modules/gallery/controllers/admin_theme_options.php
+++ b/modules/gallery/controllers/admin_theme_options.php
@@ -34,7 +34,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
module::set_var("gallery", "page_size", $form->edit_theme->page_size->value);
$thumb_size = $form->edit_theme->thumb_size->value;
- $thumb_dirty = false;
if (module::get_var("gallery", "thumb_size") != $thumb_size) {
graphics::remove_rule("gallery", "thumb", "gallery_graphics::resize");
graphics::add_rule(
@@ -45,7 +44,6 @@ class Admin_Theme_Options_Controller extends Admin_Controller {
}
$resize_size = $form->edit_theme->resize_size->value;
- $resize_dirty = false;
if (module::get_var("gallery", "resize_size") != $resize_size) {
graphics::remove_rule("gallery", "resize", "gallery_graphics::resize");
graphics::add_rule(
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php
index 7e5d0038..ac558a71 100644
--- a/modules/gallery/controllers/file_proxy.php
+++ b/modules/gallery/controllers/file_proxy.php
@@ -66,24 +66,8 @@ class File_Proxy_Controller extends Controller {
throw $e;
}
- // If the last element is .album.jpg, pop that off since it's not a real item
- $path = preg_replace("|/.album.jpg$|", "", $path);
-
- $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 movie file would
- // have been converted to a .jpg. So try some alternate types:
- if (preg_match('/.jpg$/', $path)) {
- 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()) {
- break;
- }
- }
- }
- }
+ // Get the item model using the path and type (which corresponds to a var subdir)
+ $item = item::find_by_path($path, $type);
if (!$item->loaded()) {
$e = new Kohana_404_Exception();