Ignore:
Timestamp:
12/18/09 11:10:35 (2 years ago)
Author:
CrawfordCurrie
Message:

Item2511: another optimisation; if a plugin states NO_PREFS_IN_TOPIC, then there is no real need to search for the topic, just default to $systemWeb. That means $installWeb may be wrong in the initPlugin call if the plugin was not installed in the System web; but they are never installed anywhere else (AFAIK) so the search is probably pointless

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/lib/Foswiki/Plugin.pm

    r5791 r5820  
    352352 
    353353Find the web that has the topic for this plugin by searching the 
    354 {Plugins}{WebSearchPath} 
     354{Plugins}{WebSearchPath}. Returns undef if $NO_PREFS_IN_TOPIC=1 
    355355 
    356356=cut 
     
    359359    my $this = shift; 
    360360 
    361     unless ( $this->{topicWeb} ) { 
     361    unless ( defined( $this->{topicWeb} ) || $this->{no_topic} ) { 
    362362 
    363363        # Find the plugin topic, if required 
     
    373373            } 
    374374        } 
    375         ASSERT( $this->{topicWeb}, $this->{name} ) if DEBUG; 
    376     } 
    377     return $this->{topicWeb}; 
     375    } 
     376    # If there is no web (probably because NO_PREFS_IN_TOPIC is set) 
     377    # then default to the system web name. 
     378    return $this->{topicWeb} || $Foswiki::cfg{SystemWebName}; 
    378379} 
    379380 
Note: See TracChangeset for help on using the changeset viewer.