summaryrefslogtreecommitdiffstats
path: root/patch/core_format_date_hook.patch
blob: d4a347f01f7cebc90ae782f068caba849a992fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- common.inc	Tue Oct 16 16:51:03 2012
+++ common.inc	Tue Oct 16 16:50:38 2012
@@ -1890,6 +1890,17 @@
     $drupal_static_fast['timezones'] = &drupal_static(__FUNCTION__);
   }
   $timezones = &$drupal_static_fast['timezones'];
+  
+  // Calendar Systems module new hook (The actual hook is hook_format_date this one is only a workaround to 
+  // prevent incompatibility with modules that already have a function called module_name_format_date)
+  foreach (module_implements('format_date_calendar_systems') AS $module) {
+    $function = $module .'_format_date_calendar_systems';
+    $r = $function($timestamp, $type, $format, $timezone, $langcode);
+    
+    if ($r != FALSE) {
+      return $r;
+    }
+  }
 
   if (!isset($timezone)) {
     $timezone = date_default_timezone_get();