Changeset 809


Ignore:
Timestamp:
11/19/08 13:40:25 (3 years ago)
Author:
CrawfordCurrie
Message:

Item175: First bulk rename pass. Note: not quite ready yet

Location:
trunk/core
Files:
35 deleted
269 edited
8 moved

Legend:

Unmodified
Added
Removed
  • trunk/core/bin/.htaccess.txt

    r733 r809  
    6666# Comment this out if you setup TWiki to completely deny access to WikiGuest 
    6767# in all webs or change the path to a static html page. 
    68 ErrorDocument 401 {ScriptUrlPath}/view/TWiki/UserRegistration 
     68ErrorDocument 401 {ScriptUrlPath}/view/Foswiki/UserRegistration 
    6969# Alternatively if your users are all known to be registered you may want 
    7070# to redirect them to the ResetPassword page. 
    71 # ErrorDocument 401 {ScriptUrlPath}/view/TWiki/ResetPassword  
     71# ErrorDocument 401 {ScriptUrlPath}/view/Foswiki/ResetPassword  
    7272 
    7373# Set options for excuting CGI and allow symlinks for e.g. viewauth 
  • trunk/core/bin/LocalLib.cfg.txt

    r784 r809  
    1919#$ENV{TWIKI_MONITOR} = 1; 
    2020 
    21 # -------------- Path to lib directory containing TWiki.pm.  
     21# -------------- Path to lib directory containing Foswiki.pm.  
    2222# 
    2323# REQUIRED 
  • trunk/core/bin/attach

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/changes

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/configure

    r784 r809  
    33# Foswiki - The Free Open Source Wiki, http://foswiki.org/ 
    44# 
    5 # Copyright (C) 2000-2007 TWiki Contributors. 
     5# Copyright (C) 2000-2007 Foswiki Contributors. 
    66# 
    77# This program is free software; you can redistribute it and/or 
     
    1717# As per the GPL, removal of this notice is prohibited. 
    1818# 
    19 # Configuration script for TWiki. Once you have a basic webserver 
     19# Configuration script for Foswiki. Once you have a basic webserver 
    2020# configuration that lets you access this script, the rest of the 
    2121# configuration process is done from here. 
     
    4343# The Model consists of a simple node tree, where each node represents a 
    4444# structural element in the *presentation* of the configuration (this may 
    45 # not be consistent with the structure of $TWiki:cfg, so beware). Each 
     45# not be consistent with the structure of $Foswiki:cfg, so beware). Each 
    4646# leaf node has an associated Type (in the Types subdirectory) that has 
    4747# collected model and view behaviours for the basic types. 
    4848# The Model is independent of the language used to represent the 
    49 # configuration. There is one parser/generator provided, TWikiCfg, but it 
     49# configuration. There is one parser/generator provided, FoswikiCfg, but it 
    5050# would be trivial to add others. 
    5151# 
    5252# The View is a DOM document, generated as HTML by a set of UI classes. 
    5353# Because of some convoluted history, there are actually three sets of classes 
    54 # that generate views. They are all subclasses of TWiki::Configure::UI 
     54# that generate views. They are all subclasses of Foswiki::Configure::UI 
    5555#    UIs - are top-level and pluggable UI components. All the main screens are 
    5656#          implemented here. 
     
    9595die $@ if $@; 
    9696 
    97 # We warn against running TWiki on an older Perl version then 5.8.4 
     97# We warn against running Foswiki on an older Perl version then 5.8.4 
    9898# but we will not let configure die in this situation. The user 
    99 # may have updated many libraries and tweaked TWiki so let us give 
     99# may have updated many libraries and tweaked Foswiki so let us give 
    100100# him a chance. 
    101101my $perlversion = $]; 
     
    103103    print STDERR <<HERE; 
    104104Your perl version is older than 5.6.0. 
    105 TWiki has only been successfully tested on Perl 5.6.X and 5.8.X, 
     105Foswiki has only been successfully tested on Perl 5.6.X and 5.8.X, 
    106106and there have been reports that it does not run on 5.5. 
    107 Running TWiki with an older Perl version requires upgrading of modules and 
    108 tweaking of the TWiki code. 
     107Running Foswiki with an older Perl version requires upgrading of modules and 
     108tweaking of the Foswiki code. 
    109109HERE 
    110110} 
     
    194194 
    195195########################################################### 
    196 # Establish the path to the TWiki library 
     196# Establish the path to the Foswiki library 
    197197 
    198198# Set the working dir to the bin dir 
     
    218218    $localLibFailure = $@; 
    219219    # Stick the root/lib on the path; there's a high probability we'll be 
    220     # able to find the bits of TWiki::Configure that way. We will report 
     220    # able to find the bits of Foswiki::Configure that way. We will report 
    221221    # the setlib error later. 
    222222    unshift(@INC, File::Spec->catfile(@root, 'lib')); 
     
    230230    'File::Copy', 
    231231    'File::Temp', 
    232     'TWiki::Configure::Checker', 
    233     'TWiki::Configure::CSS', 
    234     'TWiki::Configure::Item', 
    235     'TWiki::Configure::JS', 
    236     'TWiki::Configure::Load', 
    237     'TWiki::Configure::Pluggable', 
    238     'TWiki::Configure::Root', 
    239     'TWiki::Configure::Section', 
    240     'TWiki::Configure::Type', 
    241     'TWiki::Configure::Types::BOOLEAN', 
    242     'TWiki::Configure::Types::NUMBER', 
    243     'TWiki::Configure::Types::SELECT', 
    244     'TWiki::Configure::Types::STRING', 
    245     'TWiki::Configure::TWikiCfg', 
    246     'TWiki::Configure::UI', 
    247     'TWiki::Configure::UIs::Section', 
    248     'TWiki::Configure::Value', 
    249     'TWiki::Configure::Valuer', 
     232    'Foswiki::Configure::Checker', 
     233    'Foswiki::Configure::CSS', 
     234    'Foswiki::Configure::Item', 
     235    'Foswiki::Configure::JS', 
     236    'Foswiki::Configure::Load', 
     237    'Foswiki::Configure::Pluggable', 
     238    'Foswiki::Configure::Root', 
     239    'Foswiki::Configure::Section', 
     240    'Foswiki::Configure::Type', 
     241    'Foswiki::Configure::Types::BOOLEAN', 
     242    'Foswiki::Configure::Types::NUMBER', 
     243    'Foswiki::Configure::Types::SELECT', 
     244    'Foswiki::Configure::Types::STRING', 
     245    'Foswiki::Configure::FoswikiCfg', 
     246    'Foswiki::Configure::UI', 
     247    'Foswiki::Configure::UIs::Section', 
     248    'Foswiki::Configure::Value', 
     249    'Foswiki::Configure::Valuer', 
    250250   ) { 
    251251    _loadBasicModule($module); 
     
    258258# errors, so we can report errors in the browser (i.e. without using die) 
    259259 
    260 # We are configuring $TWiki::cfg, so we need to be in package TWiki from 
     260# We are configuring $Foswiki::cfg, so we need to be in package Foswiki from 
    261261# now on. 
    262 package TWiki; 
    263  
    264 # We keep the actual config, and the default from TWiki.cfg, separate 
     262package Foswiki; 
     263 
     264# We keep the actual config, and the default from Foswiki.spec, separate 
    265265use vars qw( %cfg $defaultCfg ); 
    266266 
    267 # Declared in TWiki to support checkers 
     267# Declared in Foswiki to support checkers 
    268268use vars qw( $query ); 
    269269 
    270 # 'constants' used in TWiki.cfg 
     270# 'constants' used in Foswiki.spec 
    271271use vars qw( $TRUE $FALSE ); 
    272272$TRUE = 1; 
     
    275275# Remember what we detected previously, for use by Checkers 
    276276if( $scriptName =~ /(\.\w+)$/ ) { 
    277     $TWiki::cfg{DETECTED}{ScriptExtension} = $1; 
     277    $Foswiki::cfg{DETECTED}{ScriptExtension} = $1; 
    278278} 
    279279 
     
    293293 
    294294########################################################### 
    295 # Grope the OS. This duplicates a bit of code in TWiki.pm, 
     295# Grope the OS. This duplicates a bit of code in Foswiki.pm, 
    296296# but it has to be duplicated because we don't want to deal 
    297 # with loading TWiki just yet. 
    298  
    299 unless( $TWiki::cfg{DetailedOS} ) { 
    300     $TWiki::cfg{DetailedOS} = $^O; 
    301     unless( $TWiki::cfg{DetailedOS} ) { 
     297# with loading Foswiki just yet. 
     298 
     299unless( $Foswiki::cfg{DetailedOS} ) { 
     300    $Foswiki::cfg{DetailedOS} = $^O; 
     301    unless( $Foswiki::cfg{DetailedOS} ) { 
    302302        require Config; 
    303         $TWiki::cfg{DetailedOS} = $Config::Config{osname}; 
    304     } 
    305 } 
    306 unless( $TWiki::cfg{OS} ) { 
    307     if ($TWiki::cfg{DetailedOS} =~ /darwin/i) { # MacOS X 
    308         $TWiki::cfg{OS} = 'UNIX'; 
    309     } elsif ($TWiki::cfg{DetailedOS} =~ /Win/i) { 
    310         $TWiki::cfg{OS} = 'WINDOWS'; 
    311     } elsif ($TWiki::cfg{DetailedOS} =~ /vms/i) { 
    312         $TWiki::cfg{OS} = 'VMS'; 
    313     } elsif ($TWiki::cfg{DetailedOS} =~ /bsdos/i) { 
    314         $TWiki::cfg{OS} = 'UNIX'; 
    315     } elsif ($TWiki::cfg{DetailedOS} =~ /dos/i) { 
    316         $TWiki::cfg{OS} = 'DOS'; 
    317     } elsif ($TWiki::cfg{DetailedOS} =~ /^MacOS$/i) { # MacOS 9 or earlier 
    318         $TWiki::cfg{OS} = 'MACINTOSH'; 
    319     } elsif ($TWiki::cfg{DetailedOS} =~ /os2/i) { 
    320         $TWiki::cfg{OS} = 'OS2'; 
     303        $Foswiki::cfg{DetailedOS} = $Config::Config{osname}; 
     304    } 
     305} 
     306unless( $Foswiki::cfg{OS} ) { 
     307    if ($Foswiki::cfg{DetailedOS} =~ /darwin/i) { # MacOS X 
     308        $Foswiki::cfg{OS} = 'UNIX'; 
     309    } elsif ($Foswiki::cfg{DetailedOS} =~ /Win/i) { 
     310        $Foswiki::cfg{OS} = 'WINDOWS'; 
     311    } elsif ($Foswiki::cfg{DetailedOS} =~ /vms/i) { 
     312        $Foswiki::cfg{OS} = 'VMS'; 
     313    } elsif ($Foswiki::cfg{DetailedOS} =~ /bsdos/i) { 
     314        $Foswiki::cfg{OS} = 'UNIX'; 
     315    } elsif ($Foswiki::cfg{DetailedOS} =~ /dos/i) { 
     316        $Foswiki::cfg{OS} = 'DOS'; 
     317    } elsif ($Foswiki::cfg{DetailedOS} =~ /^MacOS$/i) { # MacOS 9 or earlier 
     318        $Foswiki::cfg{OS} = 'MACINTOSH'; 
     319    } elsif ($Foswiki::cfg{DetailedOS} =~ /os2/i) { 
     320        $Foswiki::cfg{OS} = 'OS2'; 
    321321    } else { 
    322         $TWiki::cfg{OS} = 'UNIX'; 
     322        $Foswiki::cfg{OS} = 'UNIX'; 
    323323    } 
    324324} 
     
    338338    if( (defined($image)) &&  
    339339        (($image eq 'favicon.ico') || 
    340         ($image eq 'T-logo34x26-t.gif') || 
    341         ($image eq 'T-logo-140x40-t.gif') || 
     340        ($image eq 'logo22x26.gif') || 
     341        ($image eq 'logo140x40.gif') || 
    342342        ($image eq 'warning.gif') || 
    343343        ($image eq 'info.gif')) ) { 
     
    375375          -type=>'image/x-icon' } ), 
    376376    CGI::script( { language => 'JavaScript', 
    377                    type => 'text/javascript' }, TWiki::Configure::JS::js1() ), 
    378     CGI::style( { -type=>'text/css' }, TWiki::Configure::CSS::css()), 
     377                   type => 'text/javascript' }, Foswiki::Configure::JS::js1() ), 
     378    CGI::style( { -type=>'text/css' }, Foswiki::Configure::CSS::css()), 
    379379    CGI::script( { language => 'JavaScript', 
    380380                   type => 'text/javascript' }, 
    381                  TWiki::Configure::JS::js2() ), 
     381                 Foswiki::Configure::JS::js2() ), 
    382382   ); 
    383383 
    384384# Generate standard page header 
    385385my $hdr = CGI::start_html( 
    386     -title => 'TWiki Configuration', 
     386    -title => 'Foswiki Configuration', 
    387387    -head => \@meta, 
    388388    -class => 'patternNoViewPage'); 
     
    406406 
    407407# use this script recursively to serve the icon image 
    408 print CGI::img({src=>$scriptName.'?action=image;image=T-logo-140x40-t.gif;type=image/gif', class=>'logo', alt=>'TWiki', width=>'140', height=>'40'}); 
    409  
    410 my $stub = new TWiki::Configure::Item(); 
    411 # This call will define $TWiki::defaultCfg by loading .spec files 
    412 my $sanityUI = TWiki::Configure::UI::loadChecker('BasicSanity', $stub); 
     408print CGI::img({src=>$scriptName.'?action=image;image=logo140x40.gif;type=image/gif', class=>'logo', alt=>'Foswiki', width=>'140', height=>'40'}); 
     409 
     410my $stub = new Foswiki::Configure::Item(); 
     411# This call will define $Foswiki::defaultCfg by loading .spec files 
     412my $sanityUI = Foswiki::Configure::UI::loadChecker('BasicSanity', $stub); 
    413413my ($sanityStatement, $badLSC) = $sanityUI->ui(); 
    414414 
     
    458458sub _checkLoadUI { 
    459459    my ($uiname, $root) = @_; 
    460     my $ui = TWiki::Configure::UI::loadUI($uiname, $root); 
     460    my $ui = Foswiki::Configure::UI::loadUI($uiname, $root); 
    461461    unless ($ui) { 
    462462        print "Could not load $uiname UI. Error was: <pre>$@</pre>"; 
     
    472472# Action invoked by 'Next' button on the main screen 
    473473sub _actionNext { 
    474     my $valuer = new TWiki::Configure::Valuer( 
    475         $TWiki::defaultCfg, \%TWiki::cfg); 
     474    my $valuer = new Foswiki::Configure::Valuer( 
     475        $Foswiki::defaultCfg, \%Foswiki::cfg); 
    476476    my %updated; 
    477     my $modified = $valuer->loadCGIParams($TWiki::query, \%updated); 
     477    my $modified = $valuer->loadCGIParams($Foswiki::query, \%updated); 
    478478 
    479479    # create the root of the UI 
    480     my $root = new TWiki::Configure::Root(); 
     480    my $root = new Foswiki::Configure::Root(); 
    481481    my $ui; 
    482     if (!TWiki::Configure::UI::authorised()) { 
     482    if (!Foswiki::Configure::UI::authorised()) { 
    483483        print CGI::h2('Authorisation is required to save.'); 
    484484        print CGI::div($modified.' configuration item'. 
     
    492492    } else { 
    493493        # Load the specs from the .spec files and generate the UI template 
    494         TWiki::Configure::TWikiCfg::load($root, 1); 
     494        Foswiki::Configure::FoswikiCfg::load($root, 1); 
    495495 
    496496        $ui = _checkLoadUI('UPDATE', $root); 
     
    503503# Invoked by "find more extensions" button in the Extensions section 
    504504sub _actionFindMoreExtensions { 
    505     my $root = new TWiki::Configure::Root(); 
    506     print CGI::h1( 'Find TWiki Extensions'); 
     505    my $root = new Foswiki::Configure::Root(); 
     506    print CGI::h1( 'Find Foswiki Extensions'); 
    507507    print '<div class="patternContent"><div class="patternTopic">'; 
    508508 
     
    516516# Invoked when an extension is to be installed 
    517517sub _actionInstallExtension { 
    518     my $root = new TWiki::Configure::Root(); 
     518    my $root = new Foswiki::Configure::Root(); 
    519519    my $ui; 
    520     if (!TWiki::Configure::UI::authorised()) { 
     520    if (!Foswiki::Configure::UI::authorised()) { 
    521521        $ui = _checkLoadUI('AUTH', $root); 
    522522        return 1 unless $ui; 
     
    533533sub _actionConfigure { 
    534534 
    535     $TWiki::Configure::UI::toterrors = 0; 
    536     $TWiki::Configure::UI::totwarnings = 0; 
     535    $Foswiki::Configure::UI::toterrors = 0; 
     536    $Foswiki::Configure::UI::totwarnings = 0; 
    537537 
    538538    print CGI::h1( 'Configuration'); 
     
    540540 
    541541    # The first three sections go without a root 
    542     my $stub = new TWiki::Configure::Item(); 
    543     my $eui = TWiki::Configure::UI::loadChecker('Environment', $stub); 
     542    my $stub = new Foswiki::Configure::Item(); 
     543    my $eui = Foswiki::Configure::UI::loadChecker('Environment', $stub); 
    544544 
    545545    # See if this platform has special detection or checking requirements 
    546546    # (most don't) 
    547     $stub = new TWiki::Configure::Item(); 
    548     my $osui = TWiki::Configure::UI::loadChecker( 
     547    $stub = new Foswiki::Configure::Item(); 
     548    my $osui = Foswiki::Configure::UI::loadChecker( 
    549549        $Config::Config{osname}, $stub); 
    550550 
    551     $stub = new TWiki::Configure::Item(); 
    552     my $cgiui = TWiki::Configure::UI::loadChecker('CGISetup', $stub); 
     551    $stub = new Foswiki::Configure::Item(); 
     552    my $cgiui = Foswiki::Configure::UI::loadChecker('CGISetup', $stub); 
    553553 
    554554    # Use a separate root for the _saveable_ sections 
    555     my $root = new TWiki::Configure::Root(); 
    556     my $valuer = new TWiki::Configure::Valuer( 
    557         $TWiki::defaultCfg, \%TWiki::cfg); 
     555    my $root = new Foswiki::Configure::Root(); 
     556    my $valuer = new Foswiki::Configure::Valuer( 
     557        $Foswiki::defaultCfg, \%Foswiki::cfg); 
    558558    # Load the config structures. 
    559     TWiki::Configure::TWikiCfg::load($root, !$badLSC); 
     559    Foswiki::Configure::FoswikiCfg::load($root, !$badLSC); 
    560560 
    561561    if (!$badLSC) { 
     
    563563<div class="patternContent"> 
    564564 <div class="patternTopic"> 
    565   <p><strong>Use this page to set the configuration options for TWiki. 
     565  <p><strong>Use this page to set the configuration options for Foswiki. 
    566566  Fill in the settings, and then press 'Next'.</strong></p> 
    567567  <div class="explanation"> 
    568568   <ul> 
    569     <li><b>If your TWiki site is already working</b>, continue to 
    570      <a rel="nofollow" href="$TWiki::cfg{ScriptUrlPath}/view$TWiki::cfg{ScriptSuffix}/$TWiki::cfg{SystemWebName}/WebHome"> 
    571 browse to the TWiki WebHome</a>. 
     569    <li><b>If your Foswiki site is already working</b>, continue to 
     570     <a rel="nofollow" href="$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{SystemWebName}/WebHome"> 
     571browse to the Foswiki WebHome</a>. 
    572572     <ul> 
    573573      <li>You will now need to consider how you are going to manage 
    574574       authentication and access control. See the reference manual 
    575        sections on <a rel="nofollow" href="$TWiki::cfg{ScriptUrlPath}/view$TWiki::cfg{ScriptSuffix}/$TWiki::cfg{SystemWebName}/TWikiUserAuthentication"> 
     575       sections on <a rel="nofollow" href="$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{SystemWebName}/UserAuthentication"> 
    576576 authentication</a> 
    577577       and 
    578        <a rel="nofollow" href="$TWiki::cfg{ScriptUrlPath}/view$TWiki::cfg{ScriptSuffix}/$TWiki::cfg{SystemWebName}/AccessControl"> 
     578       <a rel="nofollow" href="$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{SystemWebName}/AccessControl"> 
    579579        access control</a>, and the 
    580580       <a rel="nofollow" href="#" onclick="foldBlock('SecuritySetup'); return false;">Security Setup</a> 
     
    583583     </ul> 
    584584    </li> 
    585     <li><b>To become an administrator</b> you need to first <a rel="nofollow" href="$TWiki::cfg{ScriptUrlPath}/view$TWiki::cfg{ScriptSuffix}/$TWiki::cfg{SystemWebName}/UserRegistration"> 
    586 register</a> as a normal user first and then add your wikiname to the <a rel="nofollow" href="$TWiki::cfg{ScriptUrlPath}/view$TWiki::cfg{ScriptSuffix}/$TWiki::cfg{UsersWebName}/$TWiki::cfg{SuperAdminGroup}"> 
    587  $TWiki::cfg{SuperAdminGroup}</a> (follow the text in yellow). 
     585    <li><b>To become an administrator</b> you need to first <a rel="nofollow" href="$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{SystemWebName}/UserRegistration"> 
     586register</a> as a normal user first and then add your wikiname to the <a rel="nofollow" href="$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{UsersWebName}/$Foswiki::cfg{SuperAdminGroup}"> 
     587 $Foswiki::cfg{SuperAdminGroup}</a> (follow the text in yellow). 
    588588    </li> 
    589589    <li> 
    590590     <b>If you are on a non-standard platform or environment</b> there are a lot of 
    591      <a href="http://twiki.org/cgi-bin/view/TWiki/SupplementalDocument">supplemental documents</a> 
    592      on TWiki.org describing how to 
    593      <a href="http://twiki.org/cgi-bin/view/TWiki/InstallingTWiki">install</a>, 
    594      <a href="http://twiki.org/cgi-bin/view/TWiki/UpgradingTWiki">upgrade</a>,  
    595      <a href="http://twiki.org/cgi-bin/view/TWiki/InternationalizationSupplement">internationalize</a> and  
    596      <a href="http://twiki.org/cgi-bin/view/TWiki/SecuringTWikiSite">secure</a> 
    597      your installation. 
     591     <a href="http://foswiki.org/Support/SupplementalDocuments">supplemental documents</a> on Foswiki.org 
    598592    </li> 
    599593    <li> 
    600594      <b>If you get stuck</b> there is a lot of support available at the 
    601       <a href="http://twiki.org/cgi-bin/view/Support/WebHome">TWiki:Support</a> 
    602       forum and on 
    603       <a href="http://twiki.org/cgi-bin/view/Codev/TWikiIRC">TWikiIRC</a> 
    604       (irc.freenode.net, channel #twiki). 
     595      <a href="http://foswiki.org/Support/WebHome">Support forum</a>. 
    605596     </li> 
    606597    </ul> 
     
    671662    print "</div><!-- options -->\n"; 
    672663 
    673     if ($TWiki::Configure::UI::toterrors || 
    674           $TWiki::Configure::UI::totwarnings) { 
    675         my $mess = 'Total: '.$TWiki::Configure::UI::toterrors.' error'. 
    676           ($TWiki::Configure::UI::toterrors==1?'':'s').', '. 
    677             $TWiki::Configure::UI::totwarnings.' warning'. 
    678               ($TWiki::Configure::UI::totwarnings==1?'':'s'); 
     664    if ($Foswiki::Configure::UI::toterrors || 
     665          $Foswiki::Configure::UI::totwarnings) { 
     666        my $mess = 'Total: '.$Foswiki::Configure::UI::toterrors.' error'. 
     667          ($Foswiki::Configure::UI::toterrors==1?'':'s').', '. 
     668            $Foswiki::Configure::UI::totwarnings.' warning'. 
     669              ($Foswiki::Configure::UI::totwarnings==1?'':'s'); 
    679670        print CGI::div($mess); 
    680671    } 
     
    685676                             -accesskey=>'N')); 
    686677 
    687     print "<a href=\"$TWiki::cfg{ScriptUrlPath}/view$TWiki::cfg{ScriptSuffix}/$TWiki::cfg{SystemWebName}/WebHome\">Cancel and return to TWiki WebHome</a>"; 
     678    print "<a href=\"$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{SystemWebName}/WebHome\">Cancel and return to Foswiki WebHome</a>"; 
    688679 
    689680    print CGI::end_form(); 
  • trunk/core/bin/edit

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/login

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/logon

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/manage

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/oops

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/preview

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/rdiff

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/rdiffauth

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/register

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/rename

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/resetpasswd

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/rest

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/save

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/search

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/statistics

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/twiki_cgi

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
     
    3737} 
    3838 
    39 use TWiki; 
    40 use TWiki::UI; 
    41 $TWiki::engine->run(); 
     39use Foswiki; 
     40use Foswiki::UI; 
     41$Foswiki::engine->run(); 
  • trunk/core/bin/upload

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/view

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/viewauth

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/bin/viewfile

    r784 r809  
    44# 
    55# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org 
    6 # and TWiki Contributors. 
     6# and Foswiki Contributors. 
    77# 
    88# This program is free software; you can redistribute it and/or 
     
    2424BEGIN { 
    2525    if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    26         $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     26        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    2727        use CGI::Carp qw(fatalsToBrowser); 
    2828        $SIG{__DIE__} = \&CGI::Carp::confess; 
    2929    } 
    3030    else { 
    31         $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     31        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    3232        require Carp; 
    3333        $SIG{__DIE__} = \&Carp::confess; 
     
    3838} 
    3939 
    40 use TWiki; 
    41 use TWiki::UI; 
    42 $TWiki::engine->run(); 
     40use Foswiki; 
     41use Foswiki::UI; 
     42$Foswiki::engine->run(); 
  • trunk/core/lib/DEPENDENCIES

    r14 r809  
    11Apache::Htpasswd,>=0,cpan,Optional, may be required for ApacheHtpasswd password manager 
    22Archive::Tar,>=0,cpan,Optional, may be required by the Extensions Installer in configure if command line tar or unzip is not available 
    3 B::Deparse,>=0,cpan,Required, for base TWiki 
    4 CGI,>=0,cpan,Required, for base TWiki (Versions 2.89 and 3.37 must be avoided. Most version from 3.15 and onwards should work.) 
     3B::Deparse,>=0,cpan,Required, for base Foswiki 
     4CGI,>=0,cpan,Required, for base Foswiki (Versions 2.89 and 3.37 must be avoided. Most version from 3.15 and onwards should work.) 
    55CGI::Cookie,>=1.24,cpan,Optional, required for Sessions support, available from the CPAN archive. 
    66CGI::Session,>=3.95,cpan,Optional, required for Sessions support, available from the CPAN archive. 
    7 Carp,>=0,cpan,Required, for base TWiki 
    8 Config,>=0,cpan,Required, for base TWiki 
    9 Cwd,>=0,cpan,Required, for base TWiki 
    10 Data::Dumper,>=0,cpan,Required, for base TWiki 
     7Carp,>=0,cpan,Required, for base Foswiki 
     8Config,>=0,cpan,Required, for base Foswiki 
     9Cwd,>=0,cpan,Required, for base Foswiki 
     10Data::Dumper,>=0,cpan,Required, for base Foswiki 
    1111Digest::MD5,>=0,cpan,Optional, may be required for password encryption 
    1212Digest::SHA1,>=0,cpan,Optional, may be required for password encryption 
    1313Encode,>=0,cpan,Optional, may be required for international characters 
    1414Encode::compat,>=0,cpan,Optional, may be required for international characters 
    15 Error,>=0.15,cpan,Required, for base TWiki 
    16 Exporter,>=0,cpan,Required, for base TWiki 
    17 File::Basename,>=0,cpan,Required, for base TWiki 
    18 File::Glob,>=0,cpan,Required, for base TWiki 
    19 File::Path,>=0,cpan,Required, for base TWiki 
    20 File::Spec,>=0,cpan,Required, for base TWiki 
    21 File::Temp,>=0,cpan,Required, for base TWiki 
    22 FileHandle,>=2.01,cpan,Required, for base TWiki 
     15Error,>=0.15,cpan,Required, for base Foswiki 
     16Exporter,>=0,cpan,Required, for base Foswiki 
     17File::Basename,>=0,cpan,Required, for base Foswiki 
     18File::Glob,>=0,cpan,Required, for base Foswiki 
     19File::Path,>=0,cpan,Required, for base Foswiki 
     20File::Spec,>=0,cpan,Required, for base Foswiki 
     21File::Temp,>=0,cpan,Required, for base Foswiki 
     22FileHandle,>=2.01,cpan,Required, for base Foswiki 
    2323FindBin,>=0,cpan,Optional, required if you want to use the Extensions Installer in configure 
    2424Getopt::Long,>=0,cpan,Optional, may be required for international characters 
     
    2727Locale::Maketext::Lexicon,>=0,cpan,Optional, may be required for international characters 
    2828LWP,>=0,cpan,Optional, needed for the Configure Extensions installer, and for external URL based INCLUDEs 
    29 MIME::Base64,>=0,cpan,Required, for base TWiki 
     29MIME::Base64,>=0,cpan,Required, for base Foswiki 
    3030Net::SMTP,>=2.29,cpan,Optional, may be required for sending mail 
    31 POSIX,>=1,cpan,Required, for base TWiki 
    32 Socket,>=0,cpan,Required, for base TWiki 
     31Package::Alias,>=0.04,cpan,Optional, required if you want to use TWiki plugins 
     32POSIX,>=1,cpan,Required, for base Foswiki 
     33Socket,>=0,cpan,Required, for base Foswiki 
    3334Symbol,>=0,cpan,Optional, may be required for international characters 
    3435Unicode::MapUTF8,>=0,cpan,Optional, may be required for international characters 
  • trunk/core/lib/Foswiki.pm

    r792 r809  
    11# See bottom of file for license and copyright information 
    2 package TWiki; 
     2package Foswiki; 
    33 
    44=pod 
     
    1616 
    1717---++ Public Data members 
    18    * =request=          Pointer to the TWiki::Request 
    19    * =response=         Pointer to the TWiki::Respose 
     18   * =request=          Pointer to the Foswiki::Request 
     19   * =response=         Pointer to the Foswiki::Respose 
    2020   * =context=          Hash of context ids 
    21    * moved: =loginManager=     TWiki::LoginManager singleton (moved to TWiki::Users) 
    22    * =plugins=          TWiki::Plugins singleton 
    23    * =prefs=            TWiki::Prefs singleton 
     21   * moved: =loginManager=     Foswiki::LoginManager singleton (moved to Foswiki::Users) 
     22   * =plugins=          Foswiki::Plugins singleton 
     23   * =prefs=            Foswiki::Prefs singleton 
    2424   * =remoteUser=       Login ID when using ApacheLogin. Maintained for 
    2525                        compatibility only, do not use. 
    2626   * =requestedWebName= Name of web found in URL path or =web= URL parameter 
    27    * =sandbox=          TWiki::Sandbox singleton 
     27   * =sandbox=          Foswiki::Sandbox singleton 
    2828   * =scriptUrlPath=    URL path to the current script. May be dynamically 
    2929                        extracted from the URL path if {GetScriptUrlFromCgi}. 
    3030                        Only required to support {GetScriptUrlFromCgi} and 
    3131                        not consistently used. Avoid. 
    32    * =security=         TWiki::Access singleton 
     32   * =security=         Foswiki::Access singleton 
    3333   * =SESSION_TAGS=     Hash of TWiki variables whose value is specific to 
    3434                        the current request. 
    35    * =store=            TWiki::Store singleton 
     35   * =store=            Foswiki::Store singleton 
    3636   * =topicName=        Name of topic found in URL path or =topic= URL 
    3737                        parameter 
     
    4040                        {DefaultUrlHost} 
    4141   * =user=             Unique user ID of logged-in user 
    42    * =users=            TWiki::Users singleton 
     42   * =users=            Foswiki::Users singleton 
    4343   * =webName=          Name of web found in URL path, or =web= URL parameter, 
    4444                        or {UsersWebName} 
     
    5050use Error qw( :try ); 
    5151use CGI;    # Always required to get html generation tags; 
    52 use TWiki::Response; 
    53 use TWiki::Request; 
     52 
     53BEGIN { $Package::Alias::BRAVE = 1 } 
     54use Package::Alias 
     55  'TWiki::Plugins' => 'Foswiki::Plugins', 
     56  'TWiki::Func' => 'Foswiki::Func'; 
     57{ package TWiki::Func; } 
     58 
     59use Foswiki::Response; 
     60use Foswiki::Request; 
    5461 
    5562require 5.005;    # For regex objects and internationalisation 
     
    6067# Uncomment this and the __END__ to enable AutoLoader 
    6168#use AutoLoader 'AUTOLOAD'; 
    62 # You then need to autosplit TWiki.pm: 
     69# You then need to autosplit Foswiki.pm: 
    6370# cd lib 
    64 # perl -e 'use AutoSplit; autosplit("TWiki.pm", "auto")' 
     71# perl -e 'use AutoSplit; autosplit("Foswiki.pm", "auto")' 
    6572 
    6673# Other computed constants 
     
    96103---++ StaticMethod getTWikiLibDir() -> $path 
    97104 
    98 Returns the full path of the directory containing TWiki.pm 
     105Returns the full path of the directory containing Foswiki.pm 
    99106 
    100107=cut 
     
    105112    } 
    106113 
    107     # FIXME: Should just use $INC{"TWiki.pm"} to get path used to load this 
     114    # FIXME: Should just use $INC{"Foswiki.pm"} to get path used to load this 
    108115    # module. 
    109116    my $dir = ''; 
    110117    foreach $dir (@INC) { 
    111         if ( $dir && -e "$dir/TWiki.pm" ) { 
     118        if ( $dir && -e "$dir/Foswiki.pm" ) { 
    112119            $twikiLibDir = $dir; 
    113120            last; 
     
    156163BEGIN { 
    157164    require Monitor; 
    158     require TWiki::Sandbox;                  # system command sandbox 
    159     require TWiki::Configure::Load;          # read configuration files 
     165    require Foswiki::Sandbox;                  # system command sandbox 
     166    require Foswiki::Configure::Load;          # read configuration files 
    160167 
    161168    $TRUE  = 1; 
     
    256263    $contextFreeSyntax{IF} = 1; 
    257264 
    258     unless ( ( $TWiki::cfg{DetailedOS} = $^O ) ) { 
     265    unless ( ( $Foswiki::cfg{DetailedOS} = $^O ) ) { 
    259266        require Config; 
    260         $TWiki::cfg{DetailedOS} = $Config::Config{'osname'}; 
    261     } 
    262     $TWiki::cfg{OS} = 'UNIX'; 
    263     if ( $TWiki::cfg{DetailedOS} =~ /darwin/i ) {    # MacOS X 
    264         $TWiki::cfg{OS} = 'UNIX'; 
    265     } 
    266     elsif ( $TWiki::cfg{DetailedOS} =~ /Win/i ) { 
    267         $TWiki::cfg{OS} = 'WINDOWS'; 
    268     } 
    269     elsif ( $TWiki::cfg{DetailedOS} =~ /vms/i ) { 
    270         $TWiki::cfg{OS} = 'VMS'; 
    271     } 
    272     elsif ( $TWiki::cfg{DetailedOS} =~ /bsdos/i ) { 
    273         $TWiki::cfg{OS} = 'UNIX'; 
    274     } 
    275     elsif ( $TWiki::cfg{DetailedOS} =~ /dos/i ) { 
    276         $TWiki::cfg{OS} = 'DOS'; 
    277     } 
    278     elsif ( $TWiki::cfg{DetailedOS} =~ /^MacOS$/i ) {    # MacOS 9 or earlier 
    279         $TWiki::cfg{OS} = 'MACINTOSH'; 
    280     } 
    281     elsif ( $TWiki::cfg{DetailedOS} =~ /os2/i ) { 
    282         $TWiki::cfg{OS} = 'OS2'; 
     267        $Foswiki::cfg{DetailedOS} = $Config::Config{'osname'}; 
     268    } 
     269    $Foswiki::cfg{OS} = 'UNIX'; 
     270    if ( $Foswiki::cfg{DetailedOS} =~ /darwin/i ) {    # MacOS X 
     271        $Foswiki::cfg{OS} = 'UNIX'; 
     272    } 
     273    elsif ( $Foswiki::cfg{DetailedOS} =~ /Win/i ) { 
     274        $Foswiki::cfg{OS} = 'WINDOWS'; 
     275    } 
     276    elsif ( $Foswiki::cfg{DetailedOS} =~ /vms/i ) { 
     277        $Foswiki::cfg{OS} = 'VMS'; 
     278    } 
     279    elsif ( $Foswiki::cfg{DetailedOS} =~ /bsdos/i ) { 
     280        $Foswiki::cfg{OS} = 'UNIX'; 
     281    } 
     282    elsif ( $Foswiki::cfg{DetailedOS} =~ /dos/i ) { 
     283        $Foswiki::cfg{OS} = 'DOS'; 
     284    } 
     285    elsif ( $Foswiki::cfg{DetailedOS} =~ /^MacOS$/i ) {    # MacOS 9 or earlier 
     286        $Foswiki::cfg{OS} = 'MACINTOSH'; 
     287    } 
     288    elsif ( $Foswiki::cfg{DetailedOS} =~ /os2/i ) { 
     289        $Foswiki::cfg{OS} = 'OS2'; 
    283290    } 
    284291 
     
    290297    { 
    291298        $ENV{SERVER_NAME} = 
    292           TWiki::Sandbox::untaintUnchecked( $ENV{SERVER_NAME} ); 
    293     } 
    294  
    295     # readConfig is defined in TWiki::Configure::Load to allow overriding it 
    296     TWiki::Configure::Load::readConfig(); 
    297  
    298     if ( $TWiki::cfg{WarningsAreErrors} ) { 
     299          Foswiki::Sandbox::untaintUnchecked( $ENV{SERVER_NAME} ); 
     300    } 
     301 
     302    # readConfig is defined in Foswiki::Configure::Load to allow overriding it 
     303    Foswiki::Configure::Load::readConfig(); 
     304 
     305    if ( $Foswiki::cfg{WarningsAreErrors} ) { 
    299306 
    300307        # Note: Warnings are always errors if ASSERTs are enabled 
     
    302309    } 
    303310 
    304     if ( $TWiki::cfg{UseLocale} ) { 
     311    if ( $Foswiki::cfg{UseLocale} ) { 
    305312        require locale; 
    306313        import locale(); 
     
    309316    # Constant tags dependent on the config 
    310317    $functionTags{ALLOWLOGINNAME} = 
    311       sub { $TWiki::cfg{Register}{AllowLoginName} || 0 }; 
    312     $functionTags{AUTHREALM}      = sub { $TWiki::cfg{AuthRealm} }; 
    313     $functionTags{DEFAULTURLHOST} = sub { $TWiki::cfg{DefaultUrlHost} }; 
    314     $functionTags{HOMETOPIC}      = sub { $TWiki::cfg{HomeTopicName} }; 
    315     $functionTags{LOCALSITEPREFS} = sub { $TWiki::cfg{LocalSitePreferences} }; 
     318      sub { $Foswiki::cfg{Register}{AllowLoginName} || 0 }; 
     319    $functionTags{AUTHREALM}      = sub { $Foswiki::cfg{AuthRealm} }; 
     320    $functionTags{DEFAULTURLHOST} = sub { $Foswiki::cfg{DefaultUrlHost} }; 
     321    $functionTags{HOMETOPIC}      = sub { $Foswiki::cfg{HomeTopicName} }; 
     322    $functionTags{LOCALSITEPREFS} = sub { $Foswiki::cfg{LocalSitePreferences} }; 
    316323    $functionTags{NOFOLLOW} = 
    317       sub { $TWiki::cfg{NoFollow} ? 'rel=' . $TWiki::cfg{NoFollow} : '' }; 
    318     $functionTags{NOTIFYTOPIC}       = sub { $TWiki::cfg{NotifyTopicName} }; 
    319     $functionTags{SCRIPTSUFFIX}      = sub { $TWiki::cfg{ScriptSuffix} }; 
    320     $functionTags{STATISTICSTOPIC}   = sub { $TWiki::cfg{Stats}{TopicName} }; 
    321     $functionTags{SYSTEMWEB}         = sub { $TWiki::cfg{SystemWebName} }; 
    322     $functionTags{TRASHWEB}          = sub { $TWiki::cfg{TrashWebName} }; 
    323     $functionTags{WIKIADMINLOGIN}   = sub { $TWiki::cfg{AdminUserLogin} }; 
    324     $functionTags{USERSWEB}          = sub { $TWiki::cfg{UsersWebName} }; 
    325     $functionTags{WEBPREFSTOPIC}     = sub { $TWiki::cfg{WebPrefsTopicName} }; 
    326     $functionTags{WIKIPREFSTOPIC}    = sub { $TWiki::cfg{SitePrefsTopicName} }; 
    327     $functionTags{WIKIUSERSTOPIC}    = sub { $TWiki::cfg{UsersTopicName} }; 
    328     $functionTags{WIKIWEBMASTER}     = sub { $TWiki::cfg{WebMasterEmail} }; 
    329     $functionTags{WIKIWEBMASTERNAME} = sub { $TWiki::cfg{WebMasterName} }; 
     324      sub { $Foswiki::cfg{NoFollow} ? 'rel=' . $Foswiki::cfg{NoFollow} : '' }; 
     325    $functionTags{NOTIFYTOPIC}       = sub { $Foswiki::cfg{NotifyTopicName} }; 
     326    $functionTags{SCRIPTSUFFIX}      = sub { $Foswiki::cfg{ScriptSuffix} }; 
     327    $functionTags{STATISTICSTOPIC}   = sub { $Foswiki::cfg{Stats}{TopicName} }; 
     328    $functionTags{SYSTEMWEB}         = sub { $Foswiki::cfg{SystemWebName} }; 
     329    $functionTags{TRASHWEB}          = sub { $Foswiki::cfg{TrashWebName} }; 
     330    $functionTags{WIKIADMINLOGIN}   = sub { $Foswiki::cfg{AdminUserLogin} }; 
     331    $functionTags{USERSWEB}          = sub { $Foswiki::cfg{UsersWebName} }; 
     332    $functionTags{WEBPREFSTOPIC}     = sub { $Foswiki::cfg{WebPrefsTopicName} }; 
     333    $functionTags{WIKIPREFSTOPIC}    = sub { $Foswiki::cfg{SitePrefsTopicName} }; 
     334    $functionTags{WIKIUSERSTOPIC}    = sub { $Foswiki::cfg{UsersTopicName} }; 
     335    $functionTags{WIKIWEBMASTER}     = sub { $Foswiki::cfg{WebMasterEmail} }; 
     336    $functionTags{WIKIWEBMASTERNAME} = sub { $Foswiki::cfg{WebMasterName} }; 
    330337 
    331338    # Compatibility synonyms, deprecated in 4.2 but still used throughout 
     
    341348    # this in 'non-locale regexes' mode. 
    342349 
    343     if ( $TWiki::cfg{UseLocale} ) { 
     350    if ( $Foswiki::cfg{UseLocale} ) { 
    344351 
    345352        # Set environment variables for grep 
    346         $ENV{LC_CTYPE} = $TWiki::cfg{Site}{Locale}; 
     353        $ENV{LC_CTYPE} = $Foswiki::cfg{Site}{Locale}; 
    347354 
    348355        # Load POSIX for I18N support. 
     
    353360        # won't this play with the Apache process's locale settings too? 
    354361        # What effects would this have? 
    355         setlocale( &LC_CTYPE,   $TWiki::cfg{Site}{Locale} ); 
    356         setlocale( &LC_COLLATE, $TWiki::cfg{Site}{Locale} ); 
     362        setlocale( &LC_CTYPE,   $Foswiki::cfg{Site}{Locale} ); 
     363        setlocale( &LC_COLLATE, $Foswiki::cfg{Site}{Locale} ); 
    357364    } 
    358365 
    359366    $functionTags{CHARSET} = sub { 
    360         $TWiki::cfg{Site}{CharSet} 
     367        $Foswiki::cfg{Site}{CharSet} 
    361368          || 'iso-8859-1'; 
    362369    }; 
    363370 
    364371    $functionTags{LANG} = sub { 
    365         $TWiki::cfg{Site}{Locale} =~ m/^([a-z]+_[a-z]+)/i ? $1 : 'en_US'; 
     372        $Foswiki::cfg{Site}{Locale} =~ m/^([a-z]+_[a-z]+)/i ? $1 : 'en_US'; 
    366373    }; 
    367374 
     
    376383    # Depends on locale mode and Perl version, and finally on 
    377384    # whether locale-based regexes are turned off. 
    378     if (   not $TWiki::cfg{UseLocale} 
     385    if (   not $Foswiki::cfg{UseLocale} 
    379386        or $] < 5.006 
    380         or not $TWiki::cfg{Site}{LocaleRegexes} ) 
     387        or not $Foswiki::cfg{Site}{LocaleRegexes} ) 
    381388    { 
    382389 
    383390        # No locales needed/working, or Perl 5.005, so just use 
    384391        # any additional national characters defined in TWiki.cfg 
    385         $regex{upperAlpha} = 'A-Z' . $TWiki::cfg{UpperNational}; 
    386         $regex{lowerAlpha} = 'a-z' . $TWiki::cfg{LowerNational}; 
     392        $regex{upperAlpha} = 'A-Z' . $Foswiki::cfg{UpperNational}; 
     393        $regex{lowerAlpha} = 'a-z' . $Foswiki::cfg{LowerNational}; 
    387394        $regex{numeric}    = '\d'; 
    388395        $regex{mixedAlpha} = $regex{upperAlpha} . $regex{lowerAlpha}; 
     
    404411    # book at http://regex.info/. 
    405412 
    406     $regex{linkProtocolPattern} = $TWiki::cfg{LinkProtocolPattern}; 
     413    $regex{linkProtocolPattern} = $Foswiki::cfg{LinkProtocolPattern}; 
    407414 
    408415    # Header patterns based on '+++'. The '###' are reserved for numbered 
     
    422429    $regex{webNameBaseRegex} = 
    423430      qr/[$regex{upperAlpha}]+[$regex{mixedAlphaNum}_]*/o; 
    424     if ( $TWiki::cfg{EnableHierarchicalWebs} ) { 
     431    if ( $Foswiki::cfg{EnableHierarchicalWebs} ) { 
    425432        $regex{webNameRegex} = 
    426433          qr/$regex{webNameBaseRegex}(?:(?:[\.\/]$regex{webNameBaseRegex})+)*/o; 
     
    501508    # Check for unsafe search regex mode (affects filtering in) - default 
    502509    # to safe mode 
    503     $TWiki::cfg{ForceUnsafeRegexes} = 0 
    504       unless defined $TWiki::cfg{ForceUnsafeRegexes}; 
     510    $Foswiki::cfg{ForceUnsafeRegexes} = 0 
     511      unless defined $Foswiki::cfg{ForceUnsafeRegexes}; 
    505512 
    506513    # initialize lib directory early because of later 'cd's 
     
    508515 
    509516    # initialize the runtime engine 
    510     if ( !defined $TWiki::cfg{Engine} ) { 
     517    if ( !defined $Foswiki::cfg{Engine} ) { 
    511518 
    512519        # Caller did not define an engine; try and work it out (mainly for 
    513520        # the benefit of pre-5.0 CGI scripts) 
    514521        if ( defined $ENV{GATEWAY_INTERFACE} ) { 
    515             $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; 
     522            $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI'; 
    516523            use CGI::Carp qw(fatalsToBrowser); 
    517524            $SIG{__DIE__} = \&CGI::Carp::confess; 
    518525        } 
    519526        else { 
    520             $TWiki::cfg{Engine} = 'TWiki::Engine::CLI'; 
     527            $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI'; 
    521528            require Carp; 
    522529            $SIG{__DIE__} = \&Carp::confess; 
    523530        } 
    524531    } 
    525     $engine = eval qq(use $TWiki::cfg{Engine}; $TWiki::cfg{Engine}->new); 
     532    $engine = eval qq(use $Foswiki::cfg{Engine}; $Foswiki::cfg{Engine}->new); 
    526533    die $@ if $@; 
    527534 
     
    541548    my ( $this, $text ) = @_; 
    542549 
    543     return $text unless ( defined $TWiki::cfg{Site}{CharSet} ); 
     550    return $text unless ( defined $Foswiki::cfg{Site}{CharSet} ); 
    544551 
    545552    # Detect character encoding of the full topic name from URL 
     
    550557 
    551558    # If site charset is already UTF-8, there is no need to convert anything: 
    552     if ( $TWiki::cfg{Site}{CharSet} =~ /^utf-?8$/i ) { 
     559    if ( $Foswiki::cfg{Site}{CharSet} =~ /^utf-?8$/i ) { 
    553560 
    554561        # warn if using Perl older than 5.8 
     
    567574    # Convert into ISO-8859-1 if it is the site charset.  This conversion 
    568575    # is *not valid for ISO-8859-15*. 
    569     if ( $TWiki::cfg{Site}{CharSet} =~ /^iso-?8859-?1$/i ) { 
     576    if ( $Foswiki::cfg{Site}{CharSet} =~ /^iso-?8859-?1$/i ) { 
    570577 
    571578        # ISO-8859-1 maps onto first 256 codepoints of Unicode 
     
    582589            import Encode qw(:fallbacks); 
    583590 
    584             # Map $TWiki::cfg{Site}{CharSet} into real encoding name 
     591            # Map $Foswiki::cfg{Site}{CharSet} into real encoding name 
    585592            my $charEncoding = 
    586               Encode::resolve_alias( $TWiki::cfg{Site}{CharSet} ); 
     593              Encode::resolve_alias( $Foswiki::cfg{Site}{CharSet} ); 
    587594            if ( not $charEncoding ) { 
    588595                $this->writeWarning( 'Conversion to "' 
    589                       . $TWiki::cfg{Site}{CharSet} 
     596                      . $Foswiki::cfg{Site}{CharSet} 
    590597                      . '" not supported, or name not recognised - check ' 
    591598                      . '"perldoc Encode::Supported"' ); 
     
    605612        else { 
    606613            require Unicode::MapUTF8;    # Pre-5.8 Perl versions 
    607             my $charEncoding = $TWiki::cfg{Site}{CharSet}; 
     614            my $charEncoding = $Foswiki::cfg{Site}{CharSet}; 
    608615            if ( not Unicode::MapUTF8::utf8_supported_charset($charEncoding) ) { 
    609616                $this->writeWarning( 'Conversion to "' 
    610                       . $TWiki::cfg{Site}{CharSet} 
     617                      . $Foswiki::cfg{Site}{CharSet} 
    611618                      . '" not supported, or name not recognised - check ' 
    612619                      . '"perldoc Unicode::MapUTF8"' ); 
     
    710717 
    711718        # Get time now in HTTP header format 
    712         require TWiki::Time; 
     719        require Foswiki::Time; 
    713720        my $lastModifiedString = 
    714           TWiki::Time::formatTime( time, '$http', 'gmtime' ); 
     721          Foswiki::Time::formatTime( time, '$http', 'gmtime' ); 
    715722 
    716723        # Expiry time is set high to avoid any data loss.  Each instance of 
     
    743750 
    744751    $contentType = 'text/html' unless $contentType; 
    745     if ( defined( $TWiki::cfg{Site}{CharSet} ) ) { 
    746         $contentType .= '; charset=' . $TWiki::cfg{Site}{CharSet}; 
     752    if ( defined( $Foswiki::cfg{Site}{CharSet} ) ) { 
     753        $contentType .= '; charset=' . $Foswiki::cfg{Site}{CharSet}; 
    747754    } 
    748755 
     
    772779 
    773780    #TODO: this should really use URI 
    774     if (   ( !$TWiki::cfg{AllowRedirectUrl} ) 
     781    if (   ( !$Foswiki::cfg{AllowRedirectUrl} ) 
    775782        && ( $redirect =~ m!^([^:]*://[^/]*)/*(.*)?$! ) ) 
    776783    { 
     
    778785 
    779786        #remove trailing /'s to match 
    780         $TWiki::cfg{DefaultUrlHost} =~ m!^([^:]*://[^/]*)/*(.*)?$!; 
     787        $Foswiki::cfg{DefaultUrlHost} =~ m!^([^:]*://[^/]*)/*(.*)?$!; 
    781788        my $expected = $1; 
    782789 
    783         if ( defined( $TWiki::cfg{PermittedRedirectHostUrls} ) 
    784             && $TWiki::cfg{PermittedRedirectHostUrls} ne '' ) 
     790        if ( defined( $Foswiki::cfg{PermittedRedirectHostUrls} ) 
     791            && $Foswiki::cfg{PermittedRedirectHostUrls} ne '' ) 
    785792        { 
    786793            my @permitted = 
    787794              map { s!^([^:]*://[^/]*)/*(.*)?$!$1!; $1 } 
    788               split( /,\s*/, $TWiki::cfg{PermittedRedirectHostUrls} ); 
     795              split( /,\s*/, $Foswiki::cfg{PermittedRedirectHostUrls} ); 
    789796            return 1 if ( grep ( { uc($host) eq uc($_) } @permitted ) ); 
    790797        } 
     
    913920        $url = $this->getScriptUrl( 
    914921            1, 'oops', 
    915             $this->{web}   || $TWiki::cfg{UsersWebName}, 
    916             $this->{topic} || $TWiki::cfg{HomeTopicName}, 
     922            $this->{web}   || $Foswiki::cfg{UsersWebName}, 
     923            $this->{topic} || $Foswiki::cfg{HomeTopicName}, 
    917924            template => 'oopsaccessdenied', 
    918925            def      => 'topic_access', 
     
    921928              . $url 
    922929              . ': host does not match {DefaultUrlHost} , and is not in {PermittedRedirectHostUrls}"' 
    923               . $TWiki::cfg{DefaultUrlHost} . '"' 
     930              . $Foswiki::cfg{DefaultUrlHost} . '"' 
    924931        ); 
    925932    } 
     
    961968    $md5->add( $$, time(), rand(time) ); 
    962969    my $uid              = $md5->hexdigest(); 
    963     my $passthruFilename = "$TWiki::cfg{WorkingDir}/tmp/passthru_$uid"; 
     970    my $passthruFilename = "$Foswiki::cfg{WorkingDir}/tmp/passthru_$uid"; 
    964971 
    965972    use Fcntl; 
     
    968975    sysopen( F, "$passthruFilename", O_RDWR | O_EXCL | O_CREAT, 0600 ) 
    969976      || die 
    970 "Unable to open $TWiki::cfg{WorkingDir}/tmp for write; check the setting of {WorkingDir} in configure, and check file permissions: $!"; 
     977"Unable to open $Foswiki::cfg{WorkingDir}/tmp for write; check the setting of {WorkingDir} in configure, and check file permissions: $!"; 
    971978    $query->save( \*F ); 
    972979    close(F); 
     
    10221029otherwise only user web names are valid 
    10231030 
    1024 If $TWiki::cfg{EnableHierarchicalWebs} is off, it will also return false 
     1031If $Foswiki::cfg{EnableHierarchicalWebs} is off, it will also return false 
    10251032when a nested web name is passed to it. 
    10261033 
     
    10491056 
    10501057    my @mirrorInfo = ( '', '', '', '' ); 
    1051     if ( $TWiki::cfg{SiteWebTopicName} ) { 
     1058    if ( $Foswiki::cfg{SiteWebTopicName} ) { 
    10521059        my $mirrorSiteName = 
    10531060          $this->{prefs}->getWebPreferencesValue( 'MIRRORSITENAME', $theWeb ); 
    10541061        if (   $mirrorSiteName 
    1055             && $mirrorSiteName ne $TWiki::cfg{SiteWebTopicName} ) 
     1062            && $mirrorSiteName ne $Foswiki::cfg{SiteWebTopicName} ) 
    10561063        { 
    10571064            my $mirrorViewURL = 
     
    10671074            $mirrorNote = 
    10681075              $this->renderer->getRenderedVersion( $mirrorNote, $theWeb, 
    1069                 $TWiki::cfg{HomeTopic} ); 
     1076                $Foswiki::cfg{HomeTopic} ); 
    10701077            $mirrorNote =~ s/\s*$//g; 
    10711078            @mirrorInfo = 
     
    11411148 
    11421149    my $url; 
    1143     if ( defined $TWiki::cfg{ScriptUrlPaths} && $script ) { 
    1144         $url = $TWiki::cfg{ScriptUrlPaths}{$script}; 
     1150    if ( defined $Foswiki::cfg{ScriptUrlPaths} && $script ) { 
     1151        $url = $Foswiki::cfg{ScriptUrlPaths}{$script}; 
    11451152    } 
    11461153    unless ( defined($url) ) { 
    1147         $url = $TWiki::cfg{ScriptUrlPath}; 
     1154        $url = $Foswiki::cfg{ScriptUrlPath}; 
    11481155        if ($script) { 
    11491156            $url .= '/' unless $url =~ /\/$/; 
    11501157            $url .= $script; 
    11511158            if ( 
    1152                 rindex( $url, $TWiki::cfg{ScriptSuffix} ) != 
    1153                 ( length($url) - length( $TWiki::cfg{ScriptSuffix} ) ) ) 
     1159                rindex( $url, $Foswiki::cfg{ScriptSuffix} ) != 
     1160                ( length($url) - length( $Foswiki::cfg{ScriptSuffix} ) ) ) 
    11541161            { 
    1155                 $url .= $TWiki::cfg{ScriptSuffix} if $script; 
     1162                $url .= $Foswiki::cfg{ScriptSuffix} if $script; 
    11561163            } 
    11571164        } 
     
    12211228 
    12221229    my $url = ''; 
    1223     $url .= $TWiki::cfg{PubUrlPath}; 
     1230    $url .= $Foswiki::cfg{PubUrlPath}; 
    12241231    if ( $absolute && $url !~ /^[a-z]+:/ ) { 
    12251232 
     
    13191326 
    13201327*WARNING* if there is no web specification (in the web or topic parameters) 
    1321 the web defaults to $TWiki::cfg{UsersWebName}. If there is no topic 
     1328the web defaults to $Foswiki::cfg{UsersWebName}. If there is no topic 
    13221329specification, or the topic is '0', the topic defaults to the web home topic 
    13231330name. 
     
    13541361     want to be logged-in if none is available from a session or browser. 
    13551362     Used mainly for side scripts and debugging. 
    1356    * =$query= the TWiki::Request query (may be undef, in which case an empty query 
     1363   * =$query= the Foswiki::Request query (may be undef, in which case an empty query 
    13571364     is used) 
    13581365   * =\%initialContext= - reference to a hash containing context 
     
    13631370sub new { 
    13641371    my ( $class, $login, $query, $initialContext ) = @_; 
    1365     ASSERT( !$query || UNIVERSAL::isa( $query, 'TWiki::Request' ) ); 
     1372    ASSERT( !$query || UNIVERSAL::isa( $query, 'Foswiki::Request' ) ); 
    13661373    Monitor::MARK("Static compilation complete"); 
    13671374 
    13681375    # Compatibility; not used except maybe in plugins 
    1369     $TWiki::cfg{TempfileDir} = "$TWiki::cfg{WorkingDir}/tmp" 
    1370       unless defined( $TWiki::cfg{TempfileDir} ); 
     1376    $Foswiki::cfg{TempfileDir} = "$Foswiki::cfg{WorkingDir}/tmp" 
     1377      unless defined( $Foswiki::cfg{TempfileDir} ); 
    13711378 
    13721379    # Set command_line context if there is no query 
    13731380    $initialContext ||= defined($query) ? {} : { command_line => 1 }; 
    13741381 
    1375     $query ||= new TWiki::Request(); 
     1382    $query ||= new Foswiki::Request(); 
    13761383    my $this = bless( {}, $class ); 
    13771384    $this->{request}  = $query; 
    1378     $this->{response} = new TWiki::Response(); 
    1379  
    1380     # Tell TWiki::Response which charset we are using if not default 
    1381     if ( defined $TWiki::cfg{Site}{CharSet} 
    1382         && $TWiki::cfg{Site}{CharSet} !~ /^iso-?8859-?1$/io ) 
     1385    $this->{response} = new Foswiki::Response(); 
     1386 
     1387    # Tell Foswiki::Response which charset we are using if not default 
     1388    if ( defined $Foswiki::cfg{Site}{CharSet} 
     1389        && $Foswiki::cfg{Site}{CharSet} !~ /^iso-?8859-?1$/io ) 
    13831390    { 
    1384         $this->{response}->charset( $TWiki::cfg{Site}{CharSet} ); 
     1391        $this->{response}->charset( $Foswiki::cfg{Site}{CharSet} ); 
    13851392    } 
    13861393 
     
    13931400        # "shared" between mod_perl instances 
    13941401        $sandbox = 
    1395           new TWiki::Sandbox( $TWiki::cfg{OS}, $TWiki::cfg{DetailedOS} ); 
    1396     } 
    1397     require TWiki::Plugins; 
    1398     $this->{plugins} = new TWiki::Plugins($this); 
    1399     require TWiki::Store; 
    1400     $this->{store} = new TWiki::Store($this); 
     1402          new Foswiki::Sandbox( $Foswiki::cfg{OS}, $Foswiki::cfg{DetailedOS} ); 
     1403    } 
     1404    require Foswiki::Plugins; 
     1405    $this->{plugins} = new Foswiki::Plugins($this); 
     1406    require Foswiki::Store; 
     1407    $this->{store} = new Foswiki::Store($this); 
    14011408 
    14021409    $this->{remoteUser} = 
    14031410      $login;    #use login as a default (set when running from cmd line) 
    1404     require TWiki::Users; 
    1405     $this->{users}      = new TWiki::Users($this); 
     1411    require Foswiki::Users; 
     1412    $this->{users}      = new Foswiki::Users($this); 
    14061413    $this->{remoteUser} = $this->{users}->{remoteUser}; 
    14071414 
     
    14121419    # with use strict and calling external programs that writes on the disk 
    14131420    # will fail unless Perl seens it as set to safe value. 
    1414     if ( $TWiki::cfg{SafeEnvPath} ) { 
    1415         $ENV{PATH} = $TWiki::cfg{SafeEnvPath}; 
     1421    if ( $Foswiki::cfg{SafeEnvPath} ) { 
     1422        $ENV{PATH} = $Foswiki::cfg{SafeEnvPath}; 
    14161423    } 
    14171424    else { 
    1418         $ENV{PATH} = TWiki::Sandbox::untaintUnchecked( $ENV{PATH} ); 
     1425        $ENV{PATH} = Foswiki::Sandbox::untaintUnchecked( $ENV{PATH} ); 
    14191426    } 
    14201427    delete @ENV{qw( IFS CDPATH ENV BASH_ENV )}; 
     
    14291436        # when there is nothing better available. 
    14301437        if ( $this->{urlHost} eq 'http://localhost' ) { 
    1431             $this->{urlHost} = $TWiki::cfg{DefaultUrlHost}; 
    1432         } 
    1433         elsif ( $TWiki::cfg{RemovePortNumber} ) { 
     1438            $this->{urlHost} = $Foswiki::cfg{DefaultUrlHost}; 
     1439        } 
     1440        elsif ( $Foswiki::cfg{RemovePortNumber} ) { 
    14341441            $this->{urlHost} =~ s/\:[0-9]+$//; 
    14351442        } 
    14361443    } 
    14371444    else { 
    1438         $this->{urlHost} = $TWiki::cfg{DefaultUrlHost}; 
    1439     } 
    1440     if (   $TWiki::cfg{GetScriptUrlFromCgi} 
     1445        $this->{urlHost} = $Foswiki::cfg{DefaultUrlHost}; 
     1446    } 
     1447    if (   $Foswiki::cfg{GetScriptUrlFromCgi} 
    14411448        && $url 
    14421449        && $url =~ m{^[^:]*://[^/]*(.*)/.*$} 
     
    14711478 
    14721479            # jump to WebHome if 'bin/script?topic=Webname.' 
    1473             $topic = $TWiki::cfg{HomeTopicName} if ( $web && !$topic ); 
     1480            $topic = $Foswiki::cfg{HomeTopicName} if ( $web && !$topic ); 
    14741481        } 
    14751482 
     
    14961503                        my $topictmp    = $2; 
    14971504                        my $filetmp     = $3; 
    1498                         if (-f $TWiki::cfg{PubDir}."/$webtmp$topictmp/$filetmp") { 
     1505                        if (-f $Foswiki::cfg{PubDir}."/$webtmp$topictmp/$filetmp") { 
    14991506                                $web    = $webtmp; 
    15001507                                $topic  = $topictmp; 
     
    15101517 
    15111518    # All roads lead to WebHome 
    1512     $topic = $TWiki::cfg{HomeTopicName} if ( $topic =~ /\.\./ ); 
    1513     $topic =~ s/$TWiki::cfg{NameFilter}//go; 
    1514     $topic = $TWiki::cfg{HomeTopicName} unless $topic; 
    1515     $this->{topicName} = TWiki::Sandbox::untaintUnchecked($topic); 
    1516  
    1517     $web =~ s/$TWiki::cfg{NameFilter}//go; 
     1519    $topic = $Foswiki::cfg{HomeTopicName} if ( $topic =~ /\.\./ ); 
     1520    $topic =~ s/$Foswiki::cfg{NameFilter}//go; 
     1521    $topic = $Foswiki::cfg{HomeTopicName} unless $topic; 
     1522    $this->{topicName} = Foswiki::Sandbox::untaintUnchecked($topic); 
     1523 
     1524    $web =~ s/$Foswiki::cfg{NameFilter}//go; 
    15181525    $this->{requestedWebName} = 
    1519       TWiki::Sandbox::untaintUnchecked($web);    #can be an empty string 
    1520     $web = $TWiki::cfg{UsersWebName} unless $web; 
    1521     $this->{webName} = TWiki::Sandbox::untaintUnchecked($web); 
     1526      Foswiki::Sandbox::untaintUnchecked($web);    #can be an empty string 
     1527    $web = $Foswiki::cfg{UsersWebName} unless $web; 
     1528    $this->{webName} = Foswiki::Sandbox::untaintUnchecked($web); 
    15221529 
    15231530# Convert UTF-8 web and topic name from URL into site charset if necessary 
     
    15381545    # SMELL: This untaint unchecked is duplicate of one just above 
    15391546    $this->{topicName} = 
    1540       TWiki::Sandbox::untaintUnchecked( ucfirst $this->{topicName} ); 
    1541  
    1542     $this->{scriptUrlPath} = $TWiki::cfg{ScriptUrlPath}; 
    1543  
    1544     require TWiki::Prefs; 
    1545     my $prefs = new TWiki::Prefs($this); 
     1547      Foswiki::Sandbox::untaintUnchecked( ucfirst $this->{topicName} ); 
     1548 
     1549    $this->{scriptUrlPath} = $Foswiki::cfg{ScriptUrlPath}; 
     1550 
     1551    require Foswiki::Prefs; 
     1552    my $prefs = new Foswiki::Prefs($this); 
    15461553    $this->{prefs} = $prefs; 
    15471554 
     
    15521559    $prefs->pushGlobalPreferences(); 
    15531560 
    1554     # SMELL: what happens if we move this into the TWiki::User::new? 
     1561    # SMELL: what happens if we move this into the Foswiki::User::new? 
    15551562    $this->{user} = $this->{users}->initialiseUser( $this->{remoteUser} ); 
    15561563 
     
    15761583    my $wn = $this->{users}->getWikiName( $this->{user} ); 
    15771584    if ($wn) { 
    1578         $prefs->pushPreferences( $TWiki::cfg{UsersWebName}, $wn, 
     1585        $prefs->pushPreferences( $Foswiki::cfg{UsersWebName}, $wn, 
    15791586            'USER ' . $wn ); 
    15801587    } 
     
    15911598 
    15921599 # SMELL: Every place should localize it before use, so it's not necessary here. 
    1593     $TWiki::Plugins::SESSION = $this; 
     1600    $Foswiki::Plugins::SESSION = $this; 
    15941601 
    15951602    Monitor::MARK("TWiki session created"); 
     
    16101617 
    16111618    unless ( $this->{renderer} ) { 
    1612         require TWiki::Render; 
     1619        require Foswiki::Render; 
    16131620 
    16141621        # requires preferences (such as LINKTOOLTIPINFO) 
    1615         $this->{renderer} = new TWiki::Render($this); 
     1622        $this->{renderer} = new Foswiki::Render($this); 
    16161623    } 
    16171624    return $this->{renderer}; 
     
    16301637 
    16311638    unless ( $this->{attach} ) { 
    1632         require TWiki::Attach; 
    1633         $this->{attach} = new TWiki::Attach($this); 
     1639        require Foswiki::Attach; 
     1640        $this->{attach} = new Foswiki::Attach($this); 
    16341641    } 
    16351642    return $this->{attach}; 
     
    16481655 
    16491656    unless ( $this->{templates} ) { 
    1650         require TWiki::Templates; 
    1651         $this->{templates} = new TWiki::Templates($this); 
     1657        require Foswiki::Templates; 
     1658        $this->{templates} = new Foswiki::Templates($this); 
    16521659    } 
    16531660    return $this->{templates}; 
     
    16661673 
    16671674    unless ( $this->{i18n} ) { 
    1668         require TWiki::I18N; 
     1675        require Foswiki::I18N; 
    16691676 
    16701677        # language information; must be loaded after 
    16711678        # *all possible preferences sources* are available 
    1672         $this->{i18n} = new TWiki::I18N($this); 
     1679        $this->{i18n} = new Foswiki::I18N($this); 
    16731680    } 
    16741681    return $this->{i18n}; 
     
    16871694 
    16881695    unless ( $this->{search} ) { 
    1689         require TWiki::Search; 
    1690         $this->{search} = new TWiki::Search($this); 
     1696        require Foswiki::Search; 
     1697        $this->{search} = new Foswiki::Search($this); 
    16911698    } 
    16921699    return $this->{search}; 
     
    17051712 
    17061713    unless ( $this->{security} ) { 
    1707         require TWiki::Access; 
    1708         $this->{security} = new TWiki::Access($this); 
     1714        require Foswiki::Access; 
     1715        $this->{security} = new Foswiki::Access($this); 
    17091716    } 
    17101717    return $this->{security}; 
     
    17231730 
    17241731    unless ( $this->{net} ) { 
    1725         require TWiki::Net; 
    1726         $this->{net} = new TWiki::Net($this); 
     1732        require Foswiki::Net; 
     1733        $this->{net} = new Foswiki::Net($this); 
    17271734    } 
    17281735    return $this->{net}; 
     
    18121819    my $text = "$user | $action | $webTopic | $extra | $remoteAddr |"; 
    18131820 
    1814     _writeReport( $this, $TWiki::cfg{LogFileName}, $text ); 
     1821    _writeReport( $this, $Foswiki::cfg{LogFileName}, $text ); 
    18151822} 
    18161823 
     
    18191826---++ ObjectMethod writeWarning( $text ) 
    18201827 
    1821