From 33690a32bcf132e5ab470ff77ba23c073ac26271 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 21 Sep 2009 13:33:45 -0700 Subject: Change the exif module to respond to the gallery_ready event and check to see if gettext is installed. The 3rd party library used in the exif module expects gettext to be available. Rather than doing all the time use the gallery ready event to only do it when it might be needed. Fixes ticket #672 --- modules/exif/helpers/exif_event.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/exif') diff --git a/modules/exif/helpers/exif_event.php b/modules/exif/helpers/exif_event.php index 826ec959..81ac5f44 100644 --- a/modules/exif/helpers/exif_event.php +++ b/modules/exif/helpers/exif_event.php @@ -18,6 +18,14 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class exif_event_Core { + static function gallery_ready() { + if (!function_exists("gettext")) { + function gettext($message) { + return (string) t($message); + } + } + } + static function item_created($item) { if (!$item->is_album()) { exif::extract($item); -- cgit v1.2.3