Merge commit '762fe6d92bc' into 4.5-missing-prs
[civicrm-core.git] / CRM / Utils / System / DrupalBase.php
index cc05a46f424500f9e2c6c872130102284a158cf3..a881144a69ec84bb3233467d7f92b759a8d1338e 100644 (file)
@@ -48,6 +48,12 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
    *
    */
   function __construct() {
+    /**
+     * deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific
+     * functions and leave the codebase oblivious to the type of CMS
+     * @deprecated
+     * @var bool
+     */
     $this->is_drupal = TRUE;
     $this->supports_form_extensions = TRUE;
   }
@@ -274,7 +280,21 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
    */
   function logger($message) {
     if (CRM_Core_Config::singleton()->userFrameworkLogging) {
-      watchdog('civicrm', $message, NULL, WATCHDOG_DEBUG);
+      watchdog('civicrm', '%message', array('%message' => $message), NULL, WATCHDOG_DEBUG);
     }
   }
+
+  /**
+   * Flush css/js caches
+   */
+  function clearResourceCache() {
+    _drupal_flush_css_js();
+  }
+
+  /**
+   * Append to coreResourcesList
+   */
+  function appendCoreResources(&$list) {
+    $list[] = 'js/crm.drupal.js';
+  }
 }