Changeset 974
- Timestamp:
- 11/26/08 12:42:53 (3 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
-
ActionTrackerPlugin/lib/TWiki/Plugins/ActionTrackerPlugin.pm (modified) (1 diff)
-
PublishContrib/lib/TWiki/Contrib/Publish.pm (modified) (2 diffs)
-
TestFixturePlugin/lib/TWiki/Plugins/TestFixturePlugin.pm (modified) (1 diff)
-
UnitTestContrib/test/unit/FoswikiSuite.pm (modified) (1 diff)
-
UnitTestContrib/test/unit/FoswikiTestCase.pm (modified) (3 diffs)
-
UnitTestContrib/test/unit/RequestTests.pm (modified) (1 diff)
-
UnitTestContrib/test/unit/ResponseTests.pm (modified) (3 diffs)
-
WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm (modified) (1 diff)
-
core/lib/Assert.pm (modified) (3 diffs)
-
core/lib/Foswiki.pm (modified) (2 diffs)
-
core/lib/Foswiki/Configure/UI.pm (modified) (1 diff)
-
core/lib/Foswiki/Engine/CGI.pm (modified) (1 diff)
-
core/lib/Foswiki/Engine/CLI.pm (modified) (1 diff)
-
core/lib/Foswiki/LoginManager.pm (modified) (2 diffs)
-
core/lib/Foswiki/Request.pm (modified) (1 diff)
-
core/lib/Monitor.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ActionTrackerPlugin/lib/TWiki/Plugins/ActionTrackerPlugin.pm
r464 r974 65 65 return unless _lazyInit($web, $topic); 66 66 67 my $debug = $ENV{TWIKI_ASSERTS} ? '_src' : ''; 67 my $debug = ''; 68 $debug = '_src' if DEBUG; 68 69 69 70 TWiki::Func::addToHEAD('ACTIONTRACKERPLUGIN_CSS', <<HERE); -
trunk/PublishContrib/lib/TWiki/Contrib/Publish.pm
r671 r974 478 478 $header = TWiki::Func::renderText( $header, $this->{web} ); 479 479 $header =~ s/<nop>//go; 480 TWiki::Func::writeHeader( $query);480 TWiki::Func::writeHeader(); 481 481 _display $header; 482 482 … … 600 600 $query->param('topic', "$this->{web}.$topic"); 601 601 602 # Create a new TWiki so that the contexts are correct. This is really, 603 # really inefficient, but is essential at the moment to maintain correct 604 # prefs 605 my $twiki = new TWiki($this->{publisher}, $query); 606 $TWiki::Plugins::SESSION = $twiki; 602 if (defined &TWiki::Func::pushTopicContext) { 603 TWiki::Func::pushTopicContext($this->{web}, $topic); 604 } else { 605 # Create a new TWiki so that the contexts are correct. This is really, 606 # really inefficient, but is essential to maintain correct prefs if 607 # we don't have a modern Func 608 my $twiki = new TWiki($this->{publisher}, $query); 609 $TWiki::Plugins::SESSION = $twiki; 610 } 607 611 608 612 # Because of Item5388, we have to re-read the topic to get the -
trunk/TestFixturePlugin/lib/TWiki/Plugins/TestFixturePlugin.pm
r803 r974 33 33 # 34 34 # DO NOT USE THIS PLUGIN IN A USER INSTALLATION. IT IS DESIGNED FOR 35 # TWIKI CORE TESTING ONLY!!!35 # FOSWIKI CORE TESTING ONLY!!! 36 36 # 37 37 # The idea is that topics contain blocks marked by <!-- expected --> -
trunk/UnitTestContrib/test/unit/FoswikiSuite.pm
r816 r974 30 30 my $home = "../.."; 31 31 unless (-e "$home/lib/MANIFEST") { 32 $home = $ENV{ TWIKI_HOME};32 $home = $ENV{FOSWIKI_HOME}; 33 33 } 34 34 require Cwd; -
trunk/UnitTestContrib/test/unit/FoswikiTestCase.pm
r816 r974 20 20 21 21 BEGIN { 22 push( @INC, "$ENV{ TWIKI_HOME}/lib" ) if defined($ENV{TWIKI_HOME});22 push( @INC, "$ENV{FOSWIKI_HOME}/lib" ) if defined($ENV{FOSWIKI_HOME}); 23 23 unshift @INC, '../../bin'; # SMELL: dodgy 24 24 require 'setlib.cfg'; … … 30 30 # Temporary directory to store work files in (sessions, logs etc). 31 31 # Will be cleaned up after running the tests unless the environment 32 # variable TWIKI_DEBUG_KEEP is true32 # variable FOSWIKI_DEBUG_KEEP is true 33 33 use File::Temp; 34 my $cleanup = $ENV{ TWIKI_DEBUG_KEEP} ? 0 : 1;34 my $cleanup = $ENV{FOSWIKI_DEBUG_KEEP} ? 0 : 1; 35 35 36 36 sub new { … … 130 130 } 131 131 # then reenable only those listed in MANIFEST 132 if ($ENV{ TWIKI_HOME} && -e "$ENV{TWIKI_HOME}/lib/MANIFEST") {133 open(F, "$ENV{ TWIKI_HOME}/lib/MANIFEST") || die $!;132 if ($ENV{FOSWIKI_HOME} && -e "$ENV{FOSWIKI_HOME}/lib/MANIFEST") { 133 open(F, "$ENV{FOSWIKI_HOME}/lib/MANIFEST") || die $!; 134 134 } else { 135 135 open(F, "../../lib/MANIFEST") || die $!; -
trunk/UnitTestContrib/test/unit/RequestTests.pm
r816 r974 99 99 $req->action($_); 100 100 $this->assert_str_equals($_, $req->action, 'Wrong action value'); 101 $this->assert_str_equals($_, $ENV{ TWIKI_ACTION}, 'Wrong TWIKI_ACTION environment');101 $this->assert_str_equals($_, $ENV{FOSWIKI_ACTION}, 'Wrong FOSWIKI_ACTION environment'); 102 102 } 103 103 } -
trunk/UnitTestContrib/test/unit/ResponseTests.pm
r816 r974 56 56 'f-o-o-bar' => 'baz', 57 57 'Set-COOKIe' => [ 58 ' TWIKISID=4ed0fb8647881e17852dff882f0cfaa7; path=/',58 'FOSWIKISID=4ed0fb8647881e17852dff882f0cfaa7; path=/', 59 59 'SID=8f3d9cb028e4f7dabe435bcfc4905cda; path=/' 60 60 ], … … 89 89 $this->assert_deep_equals( 90 90 [ 91 ' TWIKISID=4ed0fb8647881e17852dff882f0cfaa7; path=/',91 'FOSWIKISID=4ed0fb8647881e17852dff882f0cfaa7; path=/', 92 92 'SID=8f3d9cb028e4f7dabe435bcfc4905cda; path=/' 93 93 ], … … 130 130 require CGI::Cookie; 131 131 my $c1 = new CGI::Cookie( 132 -name => ' TWIKISID',132 -name => 'FOSWIKISID', 133 133 -value => '80eaee753351a6d4d050320ce4d60822', 134 134 -domain => 'localhost' -
trunk/WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm
r811 r974 21 21 # Readers are invited to add more testcases. 22 22 # 23 # The tests require TWIKI_LIBS to include a pointer to the lib23 # The tests require FOSWIKI_LIBS to include a pointer to the lib 24 24 # directory of a TWiki installation, so it can pick up the bits 25 25 # of TWiki it needs to include. -
trunk/core/lib/Assert.pm
r411 r974 14 14 # 15 15 # Usage is as for Carp::Assert except that you have to explicitly 16 # enable asserts using the environment variable "TWIKI_ASSERTS" 17 # add ENV{TWIKI_ASSERTS} = 1; to you bin/setlib.cfg or bin/LocalLib.cfg 16 # enable asserts using the environment variable ENV{FOSWIKI_ASSERTS} 17 # (or ENV{TWIKI_ASSERTS}) 18 # add ENV{FOSWIKI_ASSERTS} = 1; to you bin/setlib.cfg or bin/LocalLib.cfg 18 19 19 20 use strict; … … 33 34 sub ASSERTS_OFF() { 0 } # CONSTANT 34 35 35 # Export the proper DEBUG flag if TWIKI_ASSERTS is set,36 # Export the proper DEBUG flag if FOSWIKI_ASSERTS is set, 36 37 # otherwise export noop versions of our routines 37 38 sub noop { } … … 40 41 no warnings 'redefine'; 41 42 no strict 'refs'; 42 if ( $ENV{ TWIKI_ASSERTS} ) {43 if ( $ENV{FOSWIKI_ASSERTS} || $ENV{TWIKI_ASSERTS} ) { 43 44 *DEBUG = *ASSERTS_ON; 44 45 Assert->export_to_level( 1, @_ ); -
trunk/core/lib/Foswiki.pm
r966 r974 171 171 # ASSERTs 172 172 # ASSERTS are turned on by defining the environment variable 173 # TWIKI_ASSERTS. If ASSERTs are off, this is assumed to be a173 # FOSWIKI_ASSERTS. If ASSERTs are off, this is assumed to be a 174 174 # production environment, and no stack traces or paths are 175 175 # output to the browser. … … 331 331 $functionTags{WIKIWEBMASTERNAME} = sub { $Foswiki::cfg{WebMasterName} }; 332 332 333 # Compatibility synonyms, deprecated in 4.2 but still used throughout334 # the documentation.335 $functionTags{MAINWEB} = $functionTags{USERSWEB};336 $functionTags{TWIKIWEB} = $functionTags{SYSTEMWEB};337 338 333 # locale setup 339 334 # -
trunk/core/lib/Foswiki/Configure/UI.pm
r830 r974 40 40 $replist .= $Foswiki::cfg{ExtensionsRepositories} 41 41 if defined $Foswiki::cfg{ExtensionsRepositories}; 42 $replist .= "$ENV{TWIKI_REPOSITORIES};" # DEPRECATED43 if defined $ENV{TWIKI_REPOSITORIES}; # DEPRECATED44 42 $replist = ";$replist;"; 45 43 while ( -
trunk/core/lib/Foswiki/Engine/CGI.pm
r876 r974 95 95 96 96 my $action; 97 if ( exists $ENV{ TWIKI_ACTION} ) {98 99 # This handles scripts that have set $ TWIKI_ACTION100 $action = $ENV{ TWIKI_ACTION};97 if ( exists $ENV{FOSWIKI_ACTION} ) { 98 99 # This handles scripts that have set $FOSWIKI_ACTION 100 $action = $ENV{FOSWIKI_ACTION}; 101 101 } 102 102 elsif ( exists $Foswiki::cfg{SwitchBoard}{$cgiScriptName} ) { 103 103 104 104 # This handles other named CGI scripts that have a switchboard entry 105 # but haven't set $ TWIKI_ACTION (old-style run scripts)105 # but haven't set $FOSWIKI_ACTION (old-style run scripts) 106 106 $action = $cgiScriptName; 107 107 } -
trunk/core/lib/Foswiki/Engine/CLI.pm
r830 r974 76 76 sub preparePath { 77 77 my ( $this, $req ) = @_; 78 $req->action( $ENV{ TWIKI_ACTION} );79 delete $ENV{ TWIKI_ACTION};78 $req->action( $ENV{FOSWIKI_ACTION} ); 79 delete $ENV{FOSWIKI_ACTION}; 80 80 if ( exists $this->{path_info} ) { 81 81 $req->pathInfo( $this->{path_info} ); -
trunk/core/lib/Foswiki/LoginManager.pm
r830 r974 32 32 * Foswiki::LoginManager::ApacheLogin looks at REMOTE_USER (only for authenticated scripts) 33 33 * Foswiki::LoginManager::TemplateLogin just returns undef 34 1 reads the TWIKISID cookie to get the SID (or the TWIKISID parameters in the CGI query if cookies aren't available, or IP2SID mapping if that's enabled).34 1 reads the FOSWIKISID cookie to get the SID (or the FOSWIKISID parameters in the CGI query if cookies aren't available, or IP2SID mapping if that's enabled). 35 35 1 Creates the CGI::Session object, and the session is thereby read. 36 36 1 If the username still isn't known, reads it from the cookie. Thus Foswiki::LoginManager::ApacheLogin overrides the cookie using REMOTE_USER, and Foswiki::LoginManager::TemplateLogin *always* uses the session. … … 95 95 96 96 # 4.10 is broken; see Item1989 97 $Foswiki::LoginManager::Session::NAME = ' TWIKISID';97 $Foswiki::LoginManager::Session::NAME = 'FOSWIKISID'; 98 98 } 99 99 else { 100 Foswiki::LoginManager::Session->name(' TWIKISID');100 Foswiki::LoginManager::Session->name('FOSWIKISID'); 101 101 } 102 102 } -
trunk/core/lib/Foswiki/Request.pm
r815 r974 124 124 return @_ == 1 125 125 ? $_[0]->{action} 126 : ( $ENV{ TWIKI_ACTION} = $_[0]->{action} = $_[1] );126 : ( $ENV{FOSWIKI_ACTION} = $_[0]->{action} = $_[1] ); 127 127 } 128 128 -
trunk/core/lib/Monitor.pm
r809 r974 18 18 Monitor::MonitorMethod('Foswiki::Users', 'getCanonicalUserID'); 19 19 20 Then set the environment variable TWIKI_MONITOR to a perl true value, and20 Then set the environment variable FOSWIKI_MONITOR to a perl true value, and 21 21 run the script from the command line e.g: 22 22 $ cd bin … … 71 71 BEGIN { 72 72 my $caller = caller; 73 if ( $ENV{ TWIKI_MONITOR} ) {73 if ( $ENV{FOSWIKI_MONITOR} ) { 74 74 require Benchmark; 75 75 import Benchmark ':hireswallclock'; … … 94 94 95 95 sub END { 96 return unless ( $ENV{ TWIKI_MONITOR} );96 return unless ( $ENV{FOSWIKI_MONITOR} ); 97 97 MARK('END'); 98 98 my $lastbm;
Note: See TracChangeset
for help on using the changeset viewer.
