1# See bottom of file for license and copyright information 2#package TWiki; 3 4use strict; 5use warnings; 6 7use Foswiki; 8 9sub TWiki::new { 10 my ( $this, $loginName, $query, $initialContext ) = @_; 11 if ( !$Foswiki::Plugins::SESSION && UNIVERSAL::isa( $query, 'CGI' ) ) { 12 13 ## Compatibility: User gave a CGI object 14 ## This probably means we're inside a script 15 ## $query = undef; 16 # The above was added in Item689, Foswikirev:1847. It doesn't make any 17 # sense to me. PH disabled under Item11431 ('no singleton left behind') 18 } 19 my $fatwilly = new Foswiki( $loginName, $query, $initialContext ); 20 require TWiki::Sandbox; 21 $fatwilly->{sandbox} = new TWiki::Sandbox(); 22 return $fatwilly; 23} 24 25*TWiki::regex = \%Foswiki::regex; 26*TWiki::cfg = \%Foswiki::cfg; 27 281; 29__END__ 30Foswiki - The Free and Open Source Wiki, http://foswiki.org/ 31 32Copyright (C) 2008-2010 Foswiki Contributors. Foswiki Contributors 33are listed in the AUTHORS file in the root of this distribution. 34NOTE: Please extend that file, not this notice. 35 36This program is free software; you can redistribute it and/or 37modify it under the terms of the GNU General Public License 38as published by the Free Software Foundation; either version 2 39of the License, or (at your option) any later version. For 40more details read LICENSE in the root of this distribution. 41 42This program is distributed in the hope that it will be useful, 43but WITHOUT ANY WARRANTY; without even the implied warranty of 44MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 45 46As per the GPL, removal of this notice is prohibited. 47