summaryrefslogtreecommitdiff
path: root/modules/exif
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-21 13:33:45 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-21 13:33:45 -0700
commit33690a32bcf132e5ab470ff77ba23c073ac26271 (patch)
tree2fcd6b6987948a092cf0210eb98d4b230f907b3c /modules/exif
parent62863f5fead46480cf1a3f5a96eb52ce439d0f0e (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
Diffstat (limited to 'modules/exif')
-rw-r--r--modules/exif/helpers/exif_event.php8
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);