From: Mathieu Lutfy Date: Fri, 17 Dec 2021 02:08:34 +0000 (-0500) Subject: Standalone: fix url() fragment, and implement theme() for maintenance mode X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=89c10092a99e225a60d2e56f69c4fa1dcdecd965;p=civicrm-core.git Standalone: fix url() fragment, and implement theme() for maintenance mode --- diff --git a/CRM/Utils/System/Standalone.php b/CRM/Utils/System/Standalone.php index 24c9898ab9..c973ac8381 100644 --- a/CRM/Utils/System/Standalone.php +++ b/CRM/Utils/System/Standalone.php @@ -150,7 +150,8 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { $htmlize = TRUE ) { // @todo Implement absolute etc - $url = "/{$path}?{$query}"; + $fragment = $fragment ? ('#' . $fragment) : ''; + $url = "/{$path}?{$query}$fragment"; return $url; } @@ -214,12 +215,27 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { } /** - * + * @inheritDoc */ public function logout() { // @todo } + /** + * @inheritDoc + */ + public function theme(&$content, $print = FALSE, $maintenance = FALSE) { + if ($maintenance) { + $smarty = CRM_Core_Smarty::singleton(); + echo implode('', $smarty->_tpl_vars['pageHTMLHead']); + } + + // @todo Add variables from the body tag? (for Shoreditch) + + print $content; + return NULL; + } + /** * Load drupal bootstrap. *