[interchange-cvs] interchange - jon modified code/UserTag/history_scan.tag

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Mar 26 09:37:14 EST 2004


User:      jon
Date:      2004-03-26 14:37:12 GMT
Modified:  code/UserTag Tag: STABLE_5_0-branch history_scan.tag
Log:
Make pageonly=1 option work correctly when there's no History saved
in the user's session. (Merged from trunk.)

Revision  Changes    Path
No                   revision



No                   revision



1.12.2.1  +5 -1      interchange/code/UserTag/history_scan.tag


rev 1.12.2.1, prev_rev 1.12
Index: history_scan.tag
===================================================================
RCS file: /var/cvs/interchange/code/UserTag/history_scan.tag,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -u -r1.12 -r1.12.2.1
--- history_scan.tag	10 Sep 2003 15:46:47 -0000	1.12
+++ history_scan.tag	26 Mar 2004 14:37:12 -0000	1.12.2.1
@@ -70,7 +70,11 @@
 sub {
 	my ($find, $exclude, $default, $opt) = @_;
 	$default ||= $Config->{SpecialPage}{catalog};
-	my $ref = $Vend::Session->{History} or return $Tag->area($default);
+	my $ref = $Vend::Session->{History};
+	unless ($ref) {
+		return $default if $opt->{pageonly};
+		return $Tag->area($default);
+	}
 	my ($hist, $href, $cgi);
 	$exclude = qr/$exclude/ if $exclude;
 	for (my $i = $#$ref - abs($opt->{count}); $i >= 0; $i--) {








More information about the interchange-cvs mailing list