Re: [SMARTY-DEV] {counter} bug
| From: | Konstantin A. Pelepelin | Date: | Tue, 03 Jun 2003 10:56:31 +0000 |
| Subject: | Re: [SMARTY-DEV] {counter} bug | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1531@lists.php.net to get a copy of this message | ||
On Tue, 3 Jun 2003 01:04:37 -0700, Bharat Mediratta <bharat@menalto.com> wrote:
From: "messju mohr" <messju@lammfellpuschen.de> ...Both versions (2.5.0 and CVS of Tue Jun 3 10:05:46 2003 GMT ) has some problems. Code: |{{counter name=c1 assign=index start=0 print=true}}<br> {{$index}}:{{counter name=c1}}:{{$index}} <br> {{$index}}:{{counter name=c1}}:{{$index}} <br> |{{counter name=c1 start=0 print=true}}<br> {{$index}}:{{counter name=c1}}:{{$index}} <br> {{$index}}:{{counter name=c1}}:{{$index}} <br> |{{counter name=c2 start=0 print=true}}<br> {{$index}}:{{counter name=c2}}:{{$index}} <br> {{$index}}:{{counter name=c2}}:{{$index}} <br> Output in 2.5.0: | 0::1 1::2 | 0::1 1::2 | 0::1 1::2 See counter c2 inherits 'assign' attribute from c1 (3rd block) Output in CVS: |0 0::1 1::2 |3 3::4 4::5 |0 5:1:5 5:2:5 5:2:5 Counter c2 works as expected. For c1 print=true should be ignored since 'assign' is used. 'start' value is not reset in 2nd block. WBR, Konstantin A. Pelepelinthis should be fixed in cvs now. please test.Ok, this fixes the off-by-one error. However, now the new code does not return the counter number.