diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_menu.php | 11 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_theme.php | 10 | ||||
-rw-r--r-- | modules/gallery/helpers/graphics.php | 7 | ||||
-rw-r--r-- | modules/gallery/helpers/movie.php | 7 |
4 files changed, 17 insertions, 18 deletions
diff --git a/modules/gallery/helpers/gallery_menu.php b/modules/gallery/helpers/gallery_menu.php index 4499e50a..fb0234b1 100644 --- a/modules/gallery/helpers/gallery_menu.php +++ b/modules/gallery/helpers/gallery_menu.php @@ -96,12 +96,11 @@ class gallery_menu_Core { static function photo($menu, $theme) { if (access::can("view_full", $theme->item())) { - $menu - ->append(Menu::factory("link") - ->id("fullsize") - ->label(t("View full size")) - ->url("#") - ->css_class("gFullSizeLink")); + $menu->append(Menu::factory("link") + ->id("fullsize") + ->label(t("View full size")) + ->url($theme->item()->file_url()) + ->css_class("gFullSizeLink")); } } diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index c28c9040..44c1d3f1 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -31,16 +31,6 @@ class gallery_theme_Core { url::file("modules/gallery/css/quick.css") . "\" />"; $buf .= html::script("modules/gallery/js/quick.js"); } - if ($theme->page_type == "photo" && access::can("view_full", $theme->item())) { - $buf .= "<script type=\"text/javascript\" >" . - " var fullsize_detail = { " . - " close: \"" . url::file("modules/gallery/images/ico-close.png") . "\", " . - " url: \"" . $theme->item()->file_url() . "\", " . - " width: " . $theme->item()->width . ", " . - " height: " . $theme->item()->height . "};" . - "</script>"; - $buf .= html::script("modules/gallery/js/fullsize.js"); - } if (module::is_active("rss")) { if ($item = $theme->item()) { diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index feebfb34..3f3317ae 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -135,7 +135,12 @@ class graphics_Core { if ($input_item->is_movie()) { // Convert the movie to a JPG first $output_file = preg_replace("/...$/", "jpg", $output_file); - movie::extract_frame($input_file, $output_file); + try { + movie::extract_frame($input_file, $output_file); + } catch (Exception $e) { + // Assuming this is MISSING_FFMPEG for now + copy(MODPATH . "gallery/images/missing_movie.png", $output_file); + } $working_file = $output_file; } else { $working_file = $input_file; diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 1d1d29d1..28c15d81 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -53,7 +53,12 @@ class movie_Core { throw new Exception("@todo NAME_CANNOT_END_IN_PERIOD"); } - $movie_info = movie::getmoviesize($filename); + try { + $movie_info = movie::getmoviesize($filename); + } catch (Exception $e) { + // Assuming this is MISSING_FFMPEG for now + $movie_info = getimagesize(MODPATH . "gallery/images/missing_movie.png"); + } // Force an extension onto the name $pi = pathinfo($filename); |