[TikiWiki-commits] [Git][tikiwiki/tiki][cherry-pick-fad415c1] 2 commits: [FIX] date field timezone offset issue when timestamp is a string

"Domeshow Emmanuel \(@Domeshow\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a3b97a68782d_38198da4273a2@gitlab-sidekiq-low-urgency-cpu-bound-v2-749c764f6d-9hcwq.mail>

Domeshow Emmanuel pushed to branch cherry-pick-fad415c1 at Tiki Wiki CMS Groupware / Tiki


Commits:
68ed9e87 by Victor Emanouilov at 2026-06-24T11:35:59+03:00
[FIX] date field timezone offset issue when timestamp is a string

- - - - -
1669f769 by Josaphat Imani at 2026-06-24T11:38:58+03:00
[FIX] Plugin img: Remove img-fluid bootstrap class when width or height are used
---
* [FIX] Plugin img: Remove img-fluid bootstrap class when width or height are used

See merge request tikiwiki/tiki!10585


(cherry picked from commit fad415c182571f8711a28254f4ab4e3a8576ebd0)

7a222d34 [FIX] Plugin img: Remove img-fluid bootstrap class when width or height are used

Co-authored-by: Josaphat Imani <[email protected]>
- - - - -


2 changed files:

- lib/core/Tracker/Field/DateTime.php
- lib/wiki-plugins/wikiplugin_img.php


Changes:

=====================================
lib/core/Tracker/Field/DateTime.php
=====================================
@@ -207,8 +207,13 @@ class Tracker_Field_DateTime extends \Tracker\Field\AbstractItemField implements
 
         if ($value) {
             if ($this->getOption('datetime') === 'd') {
-                // offset the UTC-stored timestamp of the date by current display timezone, so we actually display the correct date entered by user
-                $value -= TikiDate::tzServerOffset(TikiLib::lib('tiki')->get_display_timezone(), $value);
+                if (is_string($value) && is_numeric($value)) {
+                    $value = intval($value);
+                }
+                if (is_numeric($value)) {
+                    // offset the UTC-stored timestamp of the date by current display timezone, so we actually display the correct date entered by user
+                    $value -= TikiDate::tzServerOffset(TikiLib::lib('tiki')->get_display_timezone(), $value);
+                }
             }
             if (isset($context['list_mode']) && $context['list_mode'] == 'csv') {
                 if ($this->getOption('datetime') == 'd') {


=====================================
lib/wiki-plugins/wikiplugin_img.php
=====================================
@@ -1216,7 +1216,7 @@ function wikiplugin_img($data, $params)
             $replimg .= 'sizes="' . $sizes . '" ';
         }
         $imgdata['class'] .= ' regImage pluginImg' . $imgdata['fileId'];
-        if ($imgdata['responsive'] == 'y') {
+        if ($imgdata['responsive'] == 'y' && empty($width) && empty($height)) {
             $imgdata['class'] .= ' img-fluid';
         }
         if ($imgdata['featured'] == 'y') {



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/19781ce52b14b287906da67cbad23eac93c56a98...1669f769a50748ae11071789899b072500741114

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/19781ce52b14b287906da67cbad23eac93c56a98...1669f769a50748ae11071789899b072500741114
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.