Skip to content

Commit

Permalink
Item14428: don't block other plugin's renderWikiWordHandler
Browse files Browse the repository at this point in the history
added "TopicTitleEnabled" context for newer NatEditPlugin
  • Loading branch information
MichaelDaum committed Dec 12, 2017
1 parent b0887fa commit 21836bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions data/System/DBCachePlugin.txt
Expand Up @@ -454,6 +454,7 @@ automatically from there on.
---++ Change History

%TABLE{columnwidths="7em" tablewidth="100%"}%
| 12 Dec 2017: | only set the link text of !WikiWords if there actually _is_ a !TopicTitle for it; set the =TopicTitleEnabled= context for natedit |
| 28 Jul 2017: | fixed restricted search; added random sorting of search results; performance improvements re-loading cache files; fixed "Can't use string as a HASH ref"; added =length()= function to formating |
| 16 Jan 2017: | oo-ify core and other code cleanup |
| 11 Jul 2016: | make use of clean-up feature of latest <nop>DBCacheContrib; performance improvements |
Expand Down
7 changes: 5 additions & 2 deletions lib/Foswiki/Plugins/DBCachePlugin.pm
Expand Up @@ -25,8 +25,8 @@ use Foswiki::Plugins();
#Monitor::MonitorMethod('Foswiki::Contrib::DBCachePlugin::Core');
#Monitor::MonitorMethod('Foswiki::Contrib::DBCachePlugin::WebDB');

our $VERSION = '10.10';
our $RELEASE = '29 Jul 2017';
our $VERSION = '10.20';
our $RELEASE = '12 Dec 2017';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Lightweighted frontend to the <nop>DBCacheContrib';

Expand Down Expand Up @@ -104,6 +104,9 @@ sub initPlugin {
@isEnabledSaveHandler = ();
@isEnabledRenameHandler = ();

# this plugin handles TopicTitles
Foswiki::Func::getContext()->{TopicTitleEnabled} = 1;

return 1;
}

Expand Down
5 changes: 2 additions & 3 deletions lib/Foswiki/Plugins/DBCachePlugin/Core.pm
Expand Up @@ -95,9 +95,8 @@ sub renderWikiWordHandler {

#_writeDebug("topicTitle=$topicTitle");

$theLinkText = $topicTitle if $topicTitle;

return $theLinkText;
return unless defined($topicTitle) && $topicTitle ne $theTopic;
return $topicTitle;
}

###############################################################################
Expand Down

0 comments on commit 21836bf

Please sign in to comment.