CRM-11823 - D6 - Warn during upgrade if the 'preprocess function' for outputing JS...
authorTim Otten <to-git@think.hm>
Tue, 12 Mar 2013 18:08:04 +0000 (14:08 -0400)
committerCiviCRM <info@civicrm.org>
Sat, 16 Mar 2013 15:55:08 +0000 (11:55 -0400)
CRM/Upgrade/Incremental/php/FourThree.php

index db6c482c0930dafed78e262c9bdb452868c32fce..bbe9a35d6e43e12b9961019a359a8b5e6751a216 100644 (file)
@@ -62,6 +62,17 @@ class CRM_Upgrade_Incremental_php_FourThree {
         return FALSE;
       }
     }
+    if ($rev == '4.3.beta4' && CRM_Utils_Constant::value('CIVICRM_UF', FALSE) == 'Drupal6') {
+      // CRM-11823 - Make sure the D6 HTML HEAD technique will work on upgrade pages
+      theme('item_list', array()); // force-load theme registry
+      $theme_registry = theme_get_registry();
+      if (
+        !isset($theme_registry['page']['preprocess functions']) ||
+        FALSE === array_search('civicrm_preprocess_page_inject', $theme_registry['page']['preprocess functions'])
+      ) {
+        CRM_Core_Error::fatal('Please reset the Drupal cache (Administer => Site Configuration => Performance => Clear cached data))');
+      }
+    }
   }
 
   /**