From: <de...@de...> - 2007-04-10 13:13:09
|
Author: CrawfordCurrie Date: 2007-04-10 08:13:01 -0500 (Tue, 10 Apr 2007) New Revision: 13348 Modified: twiki/branches/MAIN/lib/TWiki/Search.pm twiki/branches/MAIN/test/unit/Fn_SEARCH.pm Log: Item3860: fixed Arthur's issue, added unit test too Modified: twiki/branches/MAIN/lib/TWiki/Search.pm =================================================================== --- twiki/branches/MAIN/lib/TWiki/Search.pm 2007-04-10 10:46:31 UTC (rev 13347) +++ twiki/branches/MAIN/lib/TWiki/Search.pm 2007-04-10 13:13:01 UTC (rev 13348) @@ -1028,7 +1028,7 @@ $info->{meta} = $meta; my ( $revdate, $revuser, $revnum ) = $meta->getRevisionInfo(); - $info->{editby} = $revuser ? $users->webDotWikiName($revuser) : ''; + $info->{editby} = $revuser || ''; $info->{modified} = $revdate; $info->{revNum} = $revnum; Modified: twiki/branches/MAIN/test/unit/Fn_SEARCH.pm =================================================================== --- twiki/branches/MAIN/test/unit/Fn_SEARCH.pm 2007-04-10 10:46:31 UTC (rev 13347) +++ twiki/branches/MAIN/test/unit/Fn_SEARCH.pm 2007-04-10 13:13:01 UTC (rev 13348) @@ -95,4 +95,19 @@ $this->std_tests(); } +sub test_SEARCH_3860 { + my $this = shift; + my $result = $this->{twiki}->handleCommonTags( + <<'HERE', $this->{test_web}, $this->{test_topic}); +%SEARCH{"BLEEGLE" topic="OkTopic" format="$wikiname $wikiusername" nonoise="on" }% +HERE + my $wn = $this->{twiki}->{users}->getWikiName($this->{twiki}->{user}); + $this->assert_str_equals("$wn $this->{users_web}.$wn\n", $result); + $result = $this->{twiki}->handleCommonTags( + <<'HERE', $this->{test_web}, $this->{test_topic}); +%SEARCH{"BLEEGLE" topic="OkTopic" format="$createwikiname $createwikiusername" nonoise="on" }% +HERE + $this->assert_str_equals("$wn $this->{users_web}.$wn\n", $result); +} + 1; |