From c3b56f928ff3058be655533eba31929eeb4e81be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Dec 2025 16:28:00 +0100 Subject: [PATCH] CSS --- htdocs/core/boxes/box_members_last_subscriptions.php | 8 ++++---- htdocs/core/lib/functions.lib.php | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index fee00fbafdd..25c40cee881 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -48,7 +48,7 @@ class box_members_last_subscriptions extends ModeleBoxes */ public function __construct($db, $param = '') { - global $conf, $user; + global $user; $this->db = $db; @@ -72,7 +72,7 @@ class box_members_last_subscriptions extends ModeleBoxes */ public function loadBox($max = 5) { - global $user, $langs, $conf; + global $user, $langs; $langs->load("boxes"); $this->max = $max; @@ -140,10 +140,10 @@ class box_members_last_subscriptions extends ModeleBoxes 'asis' => 1, ); - $daterange = get_date_range($this->db->jdate($obj->date_start), $this->db->jdate($obj->date_end)); + $daterange = get_date_range($this->db->jdate($obj->date_start), $this->db->jdate($obj->date_end), '', null, 0); $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone" title="'.dol_escape_htmltag($daterange).'"', - 'text' => $daterange, + 'text' => ''.$daterange.'', ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a45ef6127bb..8e0c78d377b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10989,7 +10989,7 @@ function print_date_range($date_start, $date_end, $format = '', $outputlangs = n * @param int $date_end End date * @param string $format Output date format ('day', 'dayhour', ...) * @param Translate $outputlangs Output language - * @param integer $withparenthesis 1=Add parenthesis, 0=no parenthesis + * @param integer $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis * @return string String */ function get_date_range($date_start, $date_end, $format = '', $outputlangs = null, $withparenthesis = 1) @@ -11003,13 +11003,13 @@ function get_date_range($date_start, $date_end, $format = '', $outputlangs = nul } if ($date_start && $date_end) { - $out .= ($withparenthesis ? ' (' : '') . $outputlangs->transnoentitiesnoconv('DateFromTo', dol_print_date($date_start, $format, false, $outputlangs), dol_print_date($date_end, $format, false, $outputlangs)) . ($withparenthesis ? ')' : ''); + $out .= ($withparenthesis ? ($withparenthesis == 1 ? ' ' : '').'(' : '') . $outputlangs->transnoentitiesnoconv('DateFromTo', dol_print_date($date_start, $format, false, $outputlangs), dol_print_date($date_end, $format, false, $outputlangs)) . ($withparenthesis ? ')' : ''); } if ($date_start && !$date_end) { - $out .= ($withparenthesis ? ' (' : '') . $outputlangs->transnoentitiesnoconv('DateFrom', dol_print_date($date_start, $format, false, $outputlangs)) . ($withparenthesis ? ')' : ''); + $out .= ($withparenthesis ? ($withparenthesis == 1 ? ' ' : '').'(' : '') . $outputlangs->transnoentitiesnoconv('DateFrom', dol_print_date($date_start, $format, false, $outputlangs)) . ($withparenthesis ? ')' : ''); } if (!$date_start && $date_end) { - $out .= ($withparenthesis ? ' (' : '') . $outputlangs->transnoentitiesnoconv('DateUntil', dol_print_date($date_end, $format, false, $outputlangs)) . ($withparenthesis ? ')' : ''); + $out .= ($withparenthesis ? ($withparenthesis == 1 ? ' ' : '').'(' : '') . $outputlangs->transnoentitiesnoconv('DateUntil', dol_print_date($date_end, $format, false, $outputlangs)) . ($withparenthesis ? ')' : ''); } return $out; @@ -11025,8 +11025,6 @@ function get_date_range($date_start, $date_end, $format = '', $outputlangs = nul */ function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) { - global $conf; - $ret = ''; // If order not defined, we use the setup if ($nameorder < 0) {