Skip to content

Commit

Permalink
Item14202: Bad logic in the link tracking check
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Oct 23, 2016
1 parent 1f7cce3 commit fcae5c9
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions core/lib/Foswiki/PageCache.pm
Expand Up @@ -468,19 +468,18 @@ sub addTopicRef {

#Foswiki::Func::writeDebug( "addTopicRef $webRef.$topicRef\n" ) if TRACE;

if ( defined $Foswiki::cfg{Cache}{TrackInternalLinks} ) {

return if ( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'off' );

my $session = $Foswiki::Plugins::SESSION;
return
unless (
( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'authenticated' )
&& $session->inContext('authenticated') );
}
my $session = $Foswiki::Plugins::SESSION;

return $this->addDependency( $webRef, $topicRef );
return $this->addDependency( $webRef, $topicRef )
if ( !defined $Foswiki::cfg{Cache}{TrackInternalLinks}
|| ( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'on' )
|| ( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'authenticated' )
&& $session->inContext('authenticated') );

# If we reach here, either:
# - It is a guest session and TrackInternalLinks was set to authenticated
# - TrackInternalLinks is set to off (or some unexpected value.
return;
}

=begin TML
Expand Down

0 comments on commit fcae5c9

Please sign in to comment.