Commit info for scoop/lib:
Modified Files:
Scoop.pm
Log Message:
Commiting janra's fix for Bug #34 Template recurse. --hulver
Index: Scoop.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop.pm,v
retrieving revision 1.131
retrieving revision 1.132
diff -r1.131 -r1.132
308d307
< my $time;
311c310
< #warn " (Scoop::page_out) Template = $S->{CURRENT_TEMPLATE}\n" if ($DEBUG);
---
> warn " (Scoop::page_out) Template = $S->{CURRENT_TEMPLATE}\n" if ($DEBUG);
317c316
< #my $time = localtime(time());
---
> my $time = localtime(time());
322a322
> warn " (Scoop::page_out) Page is now:\n $S->{FORM}\n\n" if ($DEBUG);
387c387
< $output = $S->interpolate($S->{UI}{BLOCKS},$replacementHash,{special=>'true'})
---
> $output = $S->interpolate($template,$replacementHash,{special=>'true'})
405a406,408
> my $return = $template; # have to make changes to a copy
> # to avoid infinite loops
>
416c419
< $template =~ s/%%$fullkey%%//;
---
> $return =~ s/%%$fullkey%%//;
428,429c431,432
< warn "Replacement box text is: <<$replace>>\n";
< warn "Key ($fullkey) not found!\n" unless ($template =~ /%%\Q$fullkey\E%%/);
---
> #warn "Replacement box text is: <<$replace>>\n";
> warn "Key ($fullkey) not found!\n" unless ($return =~ /%%$fullkey%%/);
432c435
< $template =~ s/%%\Q$fullkey\E%%/$replace/g;
---
> $return =~ s/%%$fullkey%%/$replace/g;
439d441
< warn "Replacing key $key" if ($DEBUG);
441,443c443,446
< $template =~ s/%%$key%%/$data->{$key}/ge;
< } elsif ( $flags->{clear} ) {
< $template =~ s/%%$key%%//g;
---
> warn "Replacing key $key" if ($DEBUG);
> $return =~ s/%%$key%%/$data->{$key}/ge;
> # } elsif ( $flags->{clear} ) {
> # $return =~ s/%%$key%%//g;
448,449c451,452
< #warn "Clearing extra keys\n";
< $template =~ s/%%.*?%%//g;
---
> warn "Clearing extra keys\n" if $DEBUG;
> $return =~ s/%%.*?%%//g;
452c455
< return $template;
---
> return $return;