Skip to content

Commit

Permalink
Item12952: Move the Session / URL part of bootstrap
Browse files Browse the repository at this point in the history
I think that these make more sense in ConfigurePlugin.  No need to
clutter up Foswiki.pm if they work elsewhere.
  • Loading branch information
gac410 committed Sep 3, 2014
1 parent a68c7cd commit 56b48a3
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions core/lib/Foswiki.pm
Expand Up @@ -2308,30 +2308,6 @@ sub new {
# Finish plugin initialization - register handlers
$this->{plugins}->enable();

# Bootstrap code. Capture the path for the "view" script from the URL
# and stash it into a session variable for use by jsonrpc commands.
# Or if it's not in the query, recover it from the session variable.
# (jsonrpc uses POSTs, so the URL param isn't there.
if ( $Foswiki::cfg{isBOOTSTRAPPING} && defined $query ) {
my $viewpath = $query->param('VIEWPATH');
if ( defined $viewpath ) {
$Foswiki::cfg{ScriptUrlPaths}{view} = $viewpath;
$Foswiki::Plugins::SESSION->getLoginManager()
->setSessionValue( 'VIEWPATH', $viewpath );
print STDERR "AUTOCONFIG: Applied viewpath $viewpath from URL\n";
}
else {
$viewpath =
$Foswiki::Plugins::SESSION->getLoginManager()
->getSessionValue('VIEWPATH');
if ( defined $viewpath ) {
$Foswiki::cfg{ScriptUrlPaths}{view} = $viewpath;
print STDERR
"AUTOCONFIG: Applied viewpath $viewpath from SESSION\n";
}
}
}

Monitor::MARK("Foswiki object created");

return $this;
Expand Down

0 comments on commit 56b48a3

Please sign in to comment.