From 1e305b0b8b443499696fe5932d0770f3f5cfd96a Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Tue, 3 Dec 2013 06:49:48 -0800 Subject: [PATCH] CRM-13897 - Update script not runs under wordpress http://issues.civicrm.org/jira/browse/CRM-13897 --- CRM/Utils/System/Base.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index e9acb7df1a..2cae071dad 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -29,7 +29,12 @@ abstract class CRM_Utils_System_Base { // TODO: Split up; this was copied verbatim from CiviCRM 4.0's multi-UF theming function // but the parts should be copied into cleaner subclass implementations - if (function_exists('theme') && !$print) { + $config = CRM_Core_Config::singleton(); + if ( + $config->userSystem->is_drupal && + function_exists('theme') && + !$print + ) { if ($maintenance) { drupal_set_breadcrumb(''); drupal_maintenance_theme(); @@ -44,7 +49,8 @@ abstract class CRM_Utils_System_Base { $out = $content; $config = &CRM_Core_Config::singleton(); - if (!$print && + if ( + !$print && $config->userFramework == 'WordPress' ) { if (is_admin()) { -- 2.25.1