[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Deprecated warning in mod-since_last_visit_new and calendar/recurrence templates

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6978b40253f60_3b183c9c2934e@gitlab-sidekiq-low-urgency-cpu-bound-v2-56b45bf65-9gj56.mail>

ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
c45e5964 by ushindi bienvenu at 2026-01-27T12:38:29+00:00
[FIX] Deprecated warning in mod-since_last_visit_new and calendar/recurrence templates
---
* [FIX] Deprecated warning in mod-since_last_visit_new and calendar/recurrence templates

* [FIX] Using null as an array offset is deprecated in mod-since_last_visit_new

See merge request tikiwiki/tiki!9406

- - - - -


3 changed files:

- templates/calendar/recurrence.tpl
- templates/calendar/view_item.tpl
- templates/modules/mod-since_last_visit_new.tpl


Changes:

=====================================
templates/calendar/recurrence.tpl
=====================================
@@ -181,7 +181,7 @@
                                 {if $recurrence.id eq 0}<span class="input-group-text"><input type="radio" {if $recurrence.monthlyType eq 'firstlastweekday'}checked="checked"{/if} name="recurrenceTypeMonthy" value="firstlastweekday"></span>{/if}
                                 <span class="input-group-text">{tr}Every{/tr}</span>
                                 <select name="monthlyFirstLastWeekNumber" class="form-control" {if $recurrence.id neq 0}readonly{/if}>
-                                    <option value="1" {if $recurrence.monthlyFirstlastWeekdayValue[0] eq '1'} selected="selected" {/if}>
+                                    <option value="1" {if $recurrence.monthlyFirstlastWeekdayValue|string_format:"%d"|substr:0:1 eq '1'} selected="selected" {/if}>
                                         {tr}First weekday{/tr}
                                     </option>
                                     <option value="-1" {if strpos($recurrence.monthlyFirstlastWeekdayValue, '-1') === 0} selected="selected" {/if}>
@@ -372,10 +372,10 @@
                                 {if $recurrence.id eq 0}<span class="input-group-text"><input type="radio" {if $recurrence.yearlyType eq 'firstlastweekday'}checked="checked"{/if} name="recurrenceTypeYearly" value="firstlastweekday"></span>{/if}
                                 <span class="input-group-text">{tr}Every{/tr}</span>
                                 <select name="yearlyFirstLastWeekNumber" class="form-control" {if $recurrence.id neq 0}readonly{/if}>
-                                    <option value="1" {if $recurrence.yearlyFirstlastWeekdayValue[0] eq '1'} selected="selected" {/if}>
+                                    <option value="1" {if $recurrence.yearlyFirstlastWeekdayValue == 1} selected="selected" {/if}>
                                         {tr}First weekday{/tr}
                                     </option>
-                                    <option value="-1" {if strpos($recurrence.yearlyFirstlastWeekdayValue, '-1') === 0} selected="selected" {/if}>
+                                    <option value="-1" {if $recurrence.yearlyFirstlastWeekdayValue == -1} selected="selected" {/if}>
                                         {tr}Last weekday{/tr}
                                     </option>
                                 </select>


=====================================
templates/calendar/view_item.tpl
=====================================
@@ -44,7 +44,7 @@
                     {tr}Each{/tr} {$recurrence.dayOfMonth|join:', '} {tr}of the month{/tr}
                 {elseif $recurrence.monthlyType eq 'firstlastweekday'}
                     {tr}Every{/tr}
-                    {if $recurrence.monthlyFirstlastWeekdayValue[0] eq '1'}
+                    {if $recurrence.monthlyFirstlastWeekdayValue == 1}
                         {tr}First Weekday{/tr}
                     {else}
                         {tr}Last Weekday{/tr}


=====================================
templates/modules/mod-since_last_visit_new.tpl
=====================================
@@ -119,7 +119,7 @@
                             <div id="fragment-{$fragment}" class="tab-pane{if $fragment eq 1} active{/if}">
                         {/if}
                         {$cname=$slvn_item.cname}
-                        
+                        {$showcname="show_"|cat:$cname}
                         {* Comments section *}
                         {if $pos eq 'comments'}
                             {* Add debug output *}
@@ -129,7 +129,7 @@
                                         {$slvn_item.count}&nbsp;{tr}new comments{/tr}
                                     </a>
                                 </div>
-                                <div class="tab-dependent collapse" id="{$cname|escape}" style="display:{if !isset($cookie.$showcname) or $cookie.$showcname eq 'y'}{$default_folding}{else}{$opposite_folding}{/if};">
+                                <div class="tab-dependent collapse" id="{$cname|escape}" style="display:{if (!isset($cookie[$showcname]) or $cookie[$showcname] eq 'y')}{$default_folding}{else}{$opposite_folding}{/if};">
                                     {if $nonums != 'y'}<ol>{else}<ul>{/if}
                                     {section name=ix loop=$slvn_item.list}
                                         <li>



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c45e596453bafe9417058332bf15b929033a1c82

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c45e596453bafe9417058332bf15b929033a1c82
You're receiving this email because of your account on gitlab.com.

_______________________________________________
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.