bin/login
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 #!/usr/bin/perl -wT
       
     2 #
       
     3 # TWiki Enterprise Collaboration Platform, http://TWiki.org/
       
     4 #
       
     5 # Copyright (C) 2005 Garage Games
       
     6 # Copyright (C) 2005-2007 Crawford Currie http://c-dot.co.uk
       
     7 # and TWiki Contributors.
       
     8 #
       
     9 # This program is free software; you can redistribute it and/or
       
    10 # modify it under the terms of the GNU General Public License
       
    11 # as published by the Free Software Foundation; either version 2
       
    12 # of the License, or (at your option) any later version. For
       
    13 # more details read LICENSE in the root of this distribution.
       
    14 #
       
    15 # This program is distributed in the hope that it will be useful,
       
    16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       
    18 #
       
    19 # As per the GPL, removal of this notice is prohibited.
       
    20 
       
    21 BEGIN {
       
    22     # Set default current working directory (needed for mod_perl)
       
    23     if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\/]+$/ ) {
       
    24         chdir $1;
       
    25     }
       
    26     # Set library paths in @INC, at compile time
       
    27     unshift @INC, '.';
       
    28     require 'setlib.cfg';
       
    29 }
       
    30 
       
    31 use TWiki::UI;
       
    32 
       
    33 TWiki::UI::run( \&logon );
       
    34 
       
    35 sub logon {
       
    36     my $session = shift;
       
    37     $session->{users}->{loginManager}->login( $session->{cgiQuery}, $session );
       
    38 }