From e54c50e39f2623894112cffef11f5b163753e45d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 3 Jun 2025 12:14:33 +0900 Subject: [PATCH] Support custom delimiter in Context::addBrowserTitle() and Context::prependBrowserTitle() --- classes/context/Context.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index ef96466d0..b27067b8c 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -719,9 +719,10 @@ class Context * Append string to browser title * * @param string $title Browser title to be appended + * @param string $delimiter * @return void */ - public static function addBrowserTitle($title) + public static function addBrowserTitle($title, $delimiter = ' - ') { if(!$title) { @@ -729,7 +730,7 @@ class Context } if(self::$_instance->browser_title) { - self::$_instance->browser_title .= ' - ' . $title; + self::$_instance->browser_title .= $delimiter . $title; } else { @@ -741,9 +742,10 @@ class Context * Prepend string to browser title * * @param string $title Browser title to be prepended + * @param string $delimiter * @return void */ - public static function prependBrowserTitle($title) + public static function prependBrowserTitle($title, $delimiter = ' - ') { if(!$title) { @@ -751,7 +753,7 @@ class Context } if(self::$_instance->browser_title) { - self::$_instance->browser_title = $title . ' - ' . self::$_instance->browser_title; + self::$_instance->browser_title = $title . $delimiter . self::$_instance->browser_title; } else {