From 7ff485fa48c392bbbb0370f67cb1bd6fcc00c2a4 Mon Sep 17 00:00:00 2001 From: Chad Parry Date: Wed, 27 Apr 2011 20:29:06 -0600 Subject: Move the extensions helpers out of the Kohana system directory and into their own Gallery Extensions class. --- modules/gallery/helpers/extensions.php | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/gallery/helpers/extensions.php (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/extensions.php b/modules/gallery/helpers/extensions.php new file mode 100644 index 00000000..bccbfc41 --- /dev/null +++ b/modules/gallery/helpers/extensions.php @@ -0,0 +1,39 @@ +extensions = array("gif", "jpg", "jpeg", "png"); + if (movie::find_ffmpeg()) { + array_push($extensions_wrapper->extensions, "flv", "mp4", "m4v"); + } + module::event("upload_extensions", $extensions_wrapper); + return $extensions_wrapper->extensions; + } + + static function get_upload_filters() { + $filters = array(); + foreach (self::get_upload_extensions() as $extension) { + array_push($filters, "*." . $extension, "*." . strtoupper($extension)); + } + return $filters; + } +} -- cgit v1.2.3