From 0fec25d154ed4376209539142256bc9c9617f15c Mon Sep 17 00:00:00 2001 From: Herb v/d Dool <herb@3speedhub.com> Date: Wed, 11 Jan 2023 16:55:20 -0500 Subject: [PATCH] dev/core#4076 split up the theme method --- CRM/Utils/System/Drupal8.php | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index c0f18e1f6e9..d5a60340159 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -919,29 +919,10 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { * @inheritdoc */ public function theme(&$content, $print = FALSE, $maintenance = FALSE) { - $ret = FALSE; - - if (!$print) { - if ($maintenance) { - if ($region = CRM_Core_Region::instance('html-header', FALSE)) { - CRM_Utils_System::addHTMLHead($region->render('')); - } - $renderer = \Drupal::service('bare_html_page_renderer'); - $response = $renderer->renderBarePage($content, '', 'maintenance_page'); - print $response->getContent(); - exit(); - } - $ret = TRUE; - } - $out = $content; - - if ($ret) { - return $out; - } - else { - print $out; - return NULL; - } + // @todo use Drupal "maintenance page" template and theme during installation + // or upgrade. + print $content; + return NULL; } } -- GitLab