Remove usage of no longer allowed template modifier `strtotime`
authorMarcel Werk <burntime@woltlab.com>
Tue, 3 Dec 2024 12:10:27 +0000 (13:10 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 3 Dec 2024 12:10:27 +0000 (13:10 +0100)
Closes #473

docs/tutorial/series/part_2.md
snippets/tutorial/tutorial-series/part-2/templateListener.xml
snippets/tutorial/tutorial-series/part-2/templates/__personListBirthday.tpl

index 1cc95497b1c86208f83826e9f49430eb4086405e..366e6df9289925087ee26faa106870d2303d1865 100644 (file)
@@ -144,7 +144,7 @@ The code for the table head is similar to the other `th` elements:
 For the table body’s column, we need to make sure that the birthday is only show if it is actually set:
 
 ```smarty
-<td class="columnDate columnBirthday">{if $person->birthday}{@$person->birthday|strtotime|date}{/if}</td>
+<td class="columnDate columnBirthday">{if $person->birthday}{$person->birthday}{/if}</td>
 ```
 
 
index fbe8f05ecd42c774549cd6d059ddd17bd73a297b..2c886e01e6b35634d08173438523f98ae68856a1 100644 (file)
@@ -11,7 +11,7 @@
                <templatelistener name="personListBirthdayColumn">
                        <eventname>columns</eventname>
                        <environment>admin</environment>
-                       <templatecode><![CDATA[<td class="columnDate columnBirthday">{if $person->birthday}{@$person->birthday|strtotime|date}{/if}</td>]]></templatecode>
+                       <templatecode><![CDATA[<td class="columnDate columnBirthday">{if $person->birthday}{$person->birthday}{/if}</td>]]></templatecode>
                        <templatename>personList</templatename>
                </templatelistener>
                <!-- /admin -->
index 5cdf561eb0a0c2c56be56480933dd8b94a6297d8..26c05a37afb9f0b23637737304caed650c625ed6 100644 (file)
@@ -1,4 +1,4 @@
 {if $person->birthday}
        <dt>{lang}wcf.person.birthday{/lang}</dt>
-       <dd>{@$person->birthday|strtotime|date}</dd>
+       <dd>{$person->birthday}</dd>
 {/if}