Skip to content

Commit

Permalink
Item1565: fixed fallback method to get the TopicTitle without DBCache…
Browse files Browse the repository at this point in the history
…Plugin

git-svn-id: http://svn.foswiki.org/trunk/BreadCrumbsPlugin@4407 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Jul 3, 2009
1 parent c17ae81 commit a4d1f78
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions data/System/BreadCrumbsPlugin.txt
Expand Up @@ -166,6 +166,7 @@ separator) may contain special variables:
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: |   |
| 03 Jul 2009: | fixed fallback method to get the !TopicTitle without !DBCachePlugin |
| 29 Jun 2009: | use Foswiki !DBCachePlugin now |
| 17 Apr 2009: | converted to Foswiki |
| 07 Jan 2009: | fixed breadcrumbs breadcrumbs title for pattern skin |
Expand All @@ -186,6 +187,6 @@ separator) may contain special variables:
| CPAN Dependencies: | none |
| Other Dependencies: | none |
| Perl Version: | 5.8 |
| Plugin Home: | http://foswiki.org/Extensions/%TOPIC% |
| Support: | http://foswiki.org/Support/%TOPIC% |
| Plugin Home: | Foswiki:Extensions/%TOPIC% |
| Support: | Foswiki:Support/%TOPIC% |

2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/BreadCrumbsPlugin.pm
Expand Up @@ -20,7 +20,7 @@ use vars qw(
);

$VERSION = '$Rev$';
$RELEASE = 'v2.40';
$RELEASE = 'v2.41';
$NO_PREFS_IN_TOPIC = 1;
$SHORTDESCRIPTION = 'A flexible way to display breadcrumbs navigation';

Expand Down
9 changes: 7 additions & 2 deletions lib/Foswiki/Plugins/BreadCrumbsPlugin/Core.pm
Expand Up @@ -311,8 +311,7 @@ sub getTopicTitle {
}

# use core means otherwise
my $topicTitle = Foswiki::Func::getPreferencesValue("TOPICTITLE");
return $topicTitle if $topicTitle;
my $topicTitle;

my ($meta, $text) = Foswiki::Func::readTopic($theWeb, $theTopic);
my $field = $meta->get('FIELD', 'TopicTitle');
Expand All @@ -321,6 +320,12 @@ sub getTopicTitle {
return $topicTitle if $topicTitle;
}

$field = $meta->get('PREFERENCE', 'TOPICTITLE');
if ($field) {
$topicTitle = $field->{value};
return $topicTitle if $topicTitle;
}

return $theTopic;
}

Expand Down

0 comments on commit a4d1f78

Please sign in to comment.