Skip to content

Commit b89e5b0

Browse files
committed
aDIS: do not rely on implicit casting to check if links exist
1 parent 4084f54 commit b89e5b0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

data/libraries/templates/aDISWeb/accountOverview

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<t:switch prioritized="true">
22
<html>
3-
{goBackPage := $kontoPage := $orderedMagazinePage := $providedPage := $orderedPage := $requestedPage := "",
3+
{$goBackPage := "",
4+
$kontoPage := $orderedMagazinePage := $providedPage := $orderedPage := $requestedPage := (),
45
if (get("first-login", false())) then (
56
videlibri:delete-current-books(),
67
first-login := false()

data/libraries/templates/aDISWeb/template

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
<pattern href="accountOverview"/>
139139

140140
<s>nextSplitTable := false(), $splitIndex := 1, $splitCount := 0, mode:="lend"</s>
141-
<if test="$kontoPage">
141+
<if test="exists($kontoPage)">
142142
<page url="{$kontoPage}" templateFile="list"/>
143143
<loop test="$nextSplitTable">
144144
<page url="{$nextSplitTable}" templateFile="list"/>
@@ -151,25 +151,25 @@
151151
<page url="{$goBackPage}" templateFile="accountOverview"/>
152152
</if>
153153

154-
<if test="$orderedMagazinePage">
154+
<if test="exists($orderedMagazinePage)">
155155
<s>mode:="orderedMagazine"</s>
156156
<page url="{$orderedMagazinePage}" templateFile="list"/>
157157
<page url="{$goBackPage}" templateFile="accountOverview"/>
158158
</if>
159159

160-
<if test="$providedPage">
160+
<if test="exists($providedPage)">
161161
<s>mode:="provided"</s>
162162
<page url="{$providedPage}" templateFile="list"/>
163163
<page url="{$goBackPage}" templateFile="accountOverview"/>
164164
</if>
165165

166-
<if test="$orderedPage">
166+
<if test="exists($orderedPage)">
167167
<s>mode:="ordered"</s>
168168
<page url="{$orderedPage}" templateFile="list"/>
169169
<page url="{$goBackPage}" templateFile="accountOverview"/>
170170
</if>
171171

172-
<if test="$requestedPage">
172+
<if test="exists($requestedPage)">
173173
<s>mode:="requested"</s>
174174
<page url="{$requestedPage}" templateFile="list"/>
175175
<page url="{$goBackPage}" templateFile="accountOverview"/>

0 commit comments

Comments
 (0)