diff options
author | shadlaws <shad@shadlaws.com> | 2012-12-16 18:11:01 +0100 |
---|---|---|
committer | shadlaws <shad@shadlaws.com> | 2012-12-16 18:11:01 +0100 |
commit | 94b26e506c339f50b8d094057bffc1877a79afa9 (patch) | |
tree | 6926ba85de8269983e09b8ea906aceb0c241087f /modules/gallery/helpers/gallery_installer.php | |
parent | 7c62c67d56e854f69a411dd56c48ef066f951c48 (diff) |
[#1924, #1925, #1927 - enhance compatibility with movies (movie helper) and file types (legal_file helper)]
bug fix: modify movie.php helper to take DAR (display aspect ratio) into account in get_file_metadata
bug fix / enhancement: add duration to get_file_metadata output
bug fix: modify movie.php helper to use correct resolution and duration from get_file_metadata in extract_frame
bug fix: modify movie.php helper to be more robust against ffmpeg failures and limitations, including adding "-threads 1" argument if needed
enhancement: modified to include ordered maps of extensions to MIME types (get_photo_types_by_extension and get_movie_types_by_extension functions), modified get_file_metadata in movie and photo helpers to use them
gallery_installer, module.info, install.sql: updated to v52 with m4v mime correction code (was video/mp4)
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 99bc3726..1f190800 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -314,7 +314,7 @@ class gallery_installer { module::set_var("gallery", "timezone", null); module::set_var("gallery", "lock_timeout", 1); - module::set_version("gallery", 51); + module::set_version("gallery", 52); } static function upgrade($version) { @@ -688,7 +688,7 @@ class gallery_installer { if ($version == 47 || $version == 48) { // Add configuration variable to set timezone. Defaults to the currently - // used timezone (from PHP configuration). Note that in v48 we werew + // used timezone (from PHP configuration). Note that in v48 we were // setting this value incorrectly, so we're going to stomp this value for v49. module::set_var("gallery", "timezone", null); module::set_version("gallery", $version = 49); @@ -716,12 +716,25 @@ class gallery_installer { } if ($version == 50) { - // In v50, a lock_timeout variable was added so that administrators could edit the time out + // In v51, we added a lock_timeout variable so that administrators could edit the time out // from 1 second to a higher variable if their system runs concurrent parallel uploads for // instance. module::set_var("gallery", "lock_timeout", 1); module::set_version("gallery", $version = 51); } + + if ($version == 51) { + // In v52, we added functions to the legal_file helper that map photo and movie file + // extensions to their mime types (and allow extension of the list by other modules). During + // this process, we correctly mapped m4v files to video/x-m4v, correcting a previous error + // where they were mapped to video/mp4. This corrects the existing items. + db::build() + ->update("items") + ->set("mime_type", "video/x-m4v") + ->where("name", "REGEXP", "\.m4v$") // case insensitive since name column is utf8_general_ci + ->execute(); + module::set_version("gallery", $version = 52); + } } static function uninstall() { |