diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-21 13:33:45 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-21 13:33:45 -0700 |
commit | 33690a32bcf132e5ab470ff77ba23c073ac26271 (patch) | |
tree | 2fcd6b6987948a092cf0210eb98d4b230f907b3c | |
parent | 62863f5fead46480cf1a3f5a96eb52ce439d0f0e (diff) |
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
-rw-r--r-- | modules/exif/helpers/exif_event.php | 8 |
1 files changed, 8 insertions, 0 deletions
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); |