rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: Foggy on February 05, 2008, 11:45:56 AM

Title: from table
Post by: Foggy on February 05, 2008, 11:45:56 AM
If you use from table with the same variable name but change the contents of the variable it still returns the string from the original contents of the variable.

if you look in the section of macros.log I posted you can see that even though the contents of the variable were changed the same string was returned. The var has the same string ids but different content.

Code: [Select]
> $subforum
< <span style="display: none">Do your testing (and checking!) here ... contains a couple of subforums ... yes we do have these now. Note that posts in these forums won't count towards your total<br /></span><strong>Moderator:</strong> <a style="color:#0000CC;" href="/memberlist.php?mode=group&amp;g=7">Moderators</a></p>
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>Forum</dt>
<dd class="topics">Topics</dd>
<dd class="posts">Posts</dd>
<dd class="lastpost"><span>Last post</span></dd>
</dl>
</li>
</ul>
{{for|A|1|%number-folders%|{{\{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|%folder-resource%\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}/}}/for}}
<span class="corners-bottom"><span></span></span></div>
</div>

> %number-folders%
< %number-folders%

> %folder-resource%
< C:\HFS\HFS Testing\phpBB\forum

> for|A|1|11|{{\{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}/}}/for
< {{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}{{set|forum_folder|{{substring||;|{{^raw_forums}}}}}}{{load|C:\HFS\HFS Testing\phpBB\forum\{{^forum_folder}}\forum_table.txt|subforum}}{{set|raw_forums|{{cut|{{add|{{length|{{^forum_folder}}}}|2}}||{{^raw_forums}}}}}}{{$subforum_data}}

> ^raw_forums
< forum2;forum3;

> substring||;|forum2;forum3;
< forum2

> set|forum_folder|forum2
<

> ^forum_folder
< forum2

> load|C:\HFS\HFS Testing\phpBB\forum\forum2\forum_table.txt|subforum
<

> ^forum_folder
< forum2

> length|forum2
< 6

> add|6|2
< 8

> ^raw_forums
< forum2;forum3;

> cut|8||forum2;forum3;
< forum3;

> set|raw_forums|forum3;
<

> $subforum_data
< <ul class="topiclist forums">

<li class="row">
<dl class="icon" style="background-image: url(/styles/prosilver/imageset/forum_read.gif); background-repeat: no-repeat;">
<dt>
<a href="%folder%{{^forum_folder}}" class="forumtitle">{{from table|subforum|forum_name}}</a><br />
{{from table|subforum|forum_comment}} <br /><strong>Moderator:</strong> </dt>
<dd class="topics">0 <dfn>Topics</dfn></dd>

<dd class="posts">0 <dfn>Posts</dfn></dd>
<dd class="lastpost"><span>
No posts</span>
</dd>
</dl>
</li>
</ul>

> %folder%
< /

> ^forum_folder
< forum2

> from table|subforum|forum_name
< test2

> from table|subforum|forum_comment
< this is a test

> ^raw_forums
< forum3;

> substring||;|forum3;
< forum3

> set|forum_folder|forum3
<

> ^forum_folder
< forum3

> load|C:\HFS\HFS Testing\phpBB\forum\forum3\forum_table.txt|subforum
<

> ^forum_folder
< forum3

> length|forum3
< 6

> add|6|2
< 8

> ^raw_forums
< forum3;

> cut|8||forum3;
<

> set|raw_forums|
<

> $subforum_data
< <ul class="topiclist forums">

<li class="row">
<dl class="icon" style="background-image: url(/styles/prosilver/imageset/forum_read.gif); background-repeat: no-repeat;">
<dt>
<a href="%folder%{{^forum_folder}}" class="forumtitle">{{from table|subforum|forum_name}}</a><br />
{{from table|subforum|forum_comment}} <br /><strong>Moderator:</strong> </dt>
<dd class="topics">0 <dfn>Topics</dfn></dd>

<dd class="posts">0 <dfn>Posts</dfn></dd>
<dd class="lastpost"><span>
No posts</span>
</dd>
</dl>
</li>
</ul>

> %folder%
< /

> ^forum_folder
< forum3

> from table|subforum|forum_name
< test2

> from table|subforum|forum_comment
< this is a test
Title: Re: from table
Post by: rejetto on February 07, 2008, 03:08:56 AM
ye, i don't need to read the log :)
the table is parsed and cached to speed up access.
i forgot to invalidate the cache when you change the var content.

i think i must invalidate only for 'set' and 'set append'.
other ways to change a var can't be related to tables.

fixed in next beta