Skip to content

Commit

Permalink
Item1918:
Browse files Browse the repository at this point in the history
* bound visibility=private param to current user
* fix alt text for rendering=cloud

git-svn-id: http://svn.foswiki.org/trunk/TagsPlugin@7775 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OliverKrueger authored and OliverKrueger committed Jun 13, 2010
1 parent a7ab231 commit 80d18d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/System/VarTAGSEARCH.txt
Expand Up @@ -9,7 +9,7 @@
| *Parameter:* | *Description:* | *Default:* |
| =query="tag"= <br /> =query="topic"= <br /> =query="user"= | This defines the primary dimension for your search. Every search has three dimensions: =tag=, =topic= and =user=. | ="tag"= |
| =tag="text"= <br /> =tag="all"= | Filter the =tag= dimension with this setting. Use =%= as a wildcard. | ="all"= |
| =user="wikiname"= <br /> =user="all"= | Filter the =user= dimension with this setting. Leave out the =%MAINWEB%= part here. | ="all"= |
| =user="wikiname"= <br /> =user="all"= | Filter the =user= dimension with this setting. Leave out the =%MAINWEB%= part here. <br /> *Note:* This is forced to the current user, if the =visibility= is set to =private=. | ="all"= |
| =web="Name"= <br /> =web="%USERSWEB%, Know"= <br /> =web="all"= | Comma-separated list of webs to search. The special word =all= means all webs (inlcuding those which have the =NOSEARCHALL= preference set to =on=). Use =%= as a wildcard. | ="all"= |
| =topic="Name"= <br /> =topic="<nop>TestTopic1, <nop>TestTopic2"= <br /> =topic="all"= | Comma-separated list of topics (without a webname) to search. The special word =all= means all topics. Use =%= as a wildcard. | ="all"= |
| =visibility="all"= <br /> =visibility="public"= <br /> =visibility="private"= <br /> =visibility="user"= | Filter by the public flag: either show all, only public or only private tags. =user= is a combination of "all public tags" and "my private tags". <br /> *Note:* You *must not* set a =user= parameter with =visibility=user=. | ="all"= |
Expand Down
6 changes: 5 additions & 1 deletion lib/Foswiki/Plugins/TagsPlugin/TAGSEARCH.pm
Expand Up @@ -51,6 +51,10 @@ sub do {
my $theFormat = $params->{format};
my $theRendering = $params->{rendering} || '';

if ( $thePublic =~ m/private/i ) {
$theUser = Foswiki::Func::getWikiName();
}

use Foswiki::Plugins::TagsPlugin::Func;
$theTag = Foswiki::Plugins::TagsPlugin::Func::normalizeTagname($theTag);

Expand Down Expand Up @@ -330,7 +334,7 @@ $limit";
$output =~ s/\$dollar/\$/g;

# handle special renderings (ie. cloud)
if ( $theRendering =~ /^cloud$/i ) {
if ( $theRendering =~ /^cloud$/i && $row_counter > 0 ) {
my $tml = "%TAGCLOUD{ terms=\"$output\" format=\"<a style='font-size:\$weightpx;' class='tagsplugin_tagcloud_tag' href='%SCRIPTURL{view}%/%SYSTEMWEB%/TagsPluginTagDetails?tag=\$term' item='\$3.\$4' topic='\$4' web='\$3' tag='\$term' user='\$5'>\$term</a>\" warn=\"off\" split=\"[,]+\" }%";
$output = Foswiki::Func::expandCommonVariables( $tml, $topic, $web );
}
Expand Down

0 comments on commit 80d18d8

Please sign in to comment.