From: Richard D. [ H. ] <ri...@do...> - 2003-10-26 10:46:55
|
> Update of /cvsroot/twiki/twiki/bin > In directory sc8-pr-cvs1:/tmp/cvs-serv30815 > > Modified Files: > attach changes edit installpasswd mailnotify manage oops > passwd preview rdiff register rename save search statistics > testenv upload view viewfile > Log Message: > Codev.ChangeToScriptDirForModPerl fix by JohannesMartin Hi, I commented on ModPerl where this discussion started to the effect that it would be worth making this conditional on finding that the setlib.cfg file cannot be accessed. Otherwise, weird virtual hosted environments may not work even though they are already chdir'ed into the bin directory. Cheers, Richard > > Index: attach > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/attach,v > retrieving revision 1.34 > retrieving revision 1.35 > diff -C2 -r1.34 -r1.35 > *** attach 1 May 2003 07:54:36 -0000 1.34 > --- attach 26 Oct 2003 01:22:17 -0000 1.35 > *************** > *** 17,22 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw( fatalsToBrowser ); > --- 17,29 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory (needed for mod_perl) > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw( fatalsToBrowser ); > > Index: changes > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/changes,v > retrieving revision 1.19 > retrieving revision 1.20 > diff -C2 -r1.19 -r1.20 > *** changes 1 May 2003 08:15:04 -0000 1.19 > --- changes 26 Oct 2003 01:22:17 -0000 1.20 > *************** > *** 22,27 **** > # http://www.gnu.ai.mit.edu/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 22,34 ---- > # http://www.gnu.ai.mit.edu/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory (needed for mod_perl) > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: edit > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/edit,v > retrieving revision 1.68 > retrieving revision 1.69 > diff -C2 -r1.68 -r1.69 > *** edit 18 Oct 2003 22:34:00 -0000 1.68 > --- edit 26 Oct 2003 01:22:17 -0000 1.69 > *************** > *** 25,30 **** > # as parent information is passed by individual form variables, > hopefully giving a clear "API". > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI; > --- 25,37 ---- > # as parent information is passed by individual form variables, > hopefully giving a clear "API". > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI; > > Index: installpasswd > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/installpasswd,v > retrieving revision 1.8 > retrieving revision 1.9 > diff -C2 -r1.8 -r1.9 > *** installpasswd 5 Jan 2003 01:46:45 -0000 1.8 > --- installpasswd 26 Oct 2003 01:22:17 -0000 1.9 > *************** > *** 33,39 **** > #</form> > > ! > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 33,45 ---- > #</form> > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: mailnotify > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/mailnotify,v > retrieving revision 1.29 > retrieving revision 1.30 > diff -C2 -r1.29 -r1.30 > *** mailnotify 6 Jan 2003 17:05:08 -0000 1.29 > --- mailnotify 26 Oct 2003 01:22:17 -0000 1.30 > *************** > *** 24,29 **** > # - if user is a group, recurses through its members > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use TWiki; > --- 24,32 ---- > # - if user is a group, recurses through its members > > ! BEGIN { > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use TWiki; > > Index: manage > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/manage,v > retrieving revision 1.10 > retrieving revision 1.11 > diff -C2 -r1.10 -r1.11 > *** manage 2 Apr 2003 07:58:50 -0000 1.10 > --- manage 26 Oct 2003 01:22:17 -0000 1.11 > *************** > *** 20,25 **** > # a new web. > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw( fatalsToBrowser ); > --- 20,32 ---- > # a new web. > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw( fatalsToBrowser ); > > Index: oops > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/oops,v > retrieving revision 1.19 > retrieving revision 1.20 > diff -C2 -r1.19 -r1.20 > *** oops 5 Jan 2003 02:38:11 -0000 1.19 > --- oops 26 Oct 2003 01:22:17 -0000 1.20 > *************** > *** 17,22 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 17,29 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory (needed for mod_perl) > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: passwd > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/passwd,v > retrieving revision 1.11 > retrieving revision 1.12 > diff -C2 -r1.11 -r1.12 > *** passwd 5 Jan 2003 02:38:11 -0000 1.11 > --- passwd 26 Oct 2003 01:22:17 -0000 1.12 > *************** > *** 42,47 **** > # > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 42,54 ---- > # > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: preview > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/preview,v > retrieving revision 1.46 > retrieving revision 1.47 > diff -C2 -r1.46 -r1.47 > *** preview 29 Aug 2003 07:30:07 -0000 1.46 > --- preview 26 Oct 2003 01:22:17 -0000 1.47 > *************** > *** 17,22 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 17,29 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: rdiff > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/rdiff,v > retrieving revision 1.30 > retrieving revision 1.31 > diff -C2 -r1.30 -r1.31 > *** rdiff 11 Apr 2003 05:59:12 -0000 1.30 > --- rdiff 26 Oct 2003 01:22:17 -0000 1.31 > *************** > *** 17,22 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 17,29 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory (needed for mod_perl) > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: register > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/register,v > retrieving revision 1.38 > retrieving revision 1.39 > diff -C2 -r1.38 -r1.39 > *** register 18 Oct 2003 22:34:00 -0000 1.38 > --- register 26 Oct 2003 01:22:17 -0000 1.39 > *************** > *** 17,22 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > # I18N: No locale settings necessary yet - only 7-bit ASCII due > --- 17,29 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > # I18N: No locale settings necessary yet - only 7-bit ASCII due > > Index: rename > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/rename,v > retrieving revision 1.45 > retrieving revision 1.46 > diff -C2 -r1.45 -r1.46 > *** rename 18 May 2003 21:18:14 -0000 1.45 > --- rename 26 Oct 2003 01:22:17 -0000 1.46 > *************** > *** 19,28 **** > # > > - # Set library paths in @INC, at compile time > - BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > - > - # 'Use locale' for internationalisation of Perl regexes - > - # main locale settings are done in TWiki::setupLocale > BEGIN { > # Do a dynamic 'use locale' for this module > if( $TWiki::useLocale ) { > --- 19,33 ---- > # > > BEGIN { > + # Set default current working directory > + if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > + chdir $1; > + } > + # Set library paths in @INC at compile time > + unshift @INC, '.'; > + require 'setlib.cfg'; > + > + # 'Use locale' for internationalisation of Perl regexes - > + # main locale settings are done in TWiki::setupLocale > # Do a dynamic 'use locale' for this module > if( $TWiki::useLocale ) { > > Index: save > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/save,v > retrieving revision 1.37 > retrieving revision 1.38 > diff -C2 -r1.37 -r1.38 > *** save 14 Mar 2003 22:23:49 -0000 1.37 > --- save 26 Oct 2003 01:22:17 -0000 1.38 > *************** > *** 21,26 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 21,33 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: search > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/search,v > retrieving revision 1.20 > retrieving revision 1.21 > diff -C2 -r1.20 -r1.21 > *** search 29 Sep 2003 01:12:44 -0000 1.20 > --- search 26 Oct 2003 01:22:17 -0000 1.21 > *************** > *** 22,27 **** > # the searchWikiWeb call, added new params. > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 22,34 ---- > # the searchWikiWeb call, added new params. > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > Index: statistics > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/statistics,v > retrieving revision 1.39 > retrieving revision 1.40 > diff -C2 -r1.39 -r1.40 > *** statistics 6 Mar 2003 07:57:39 -0000 1.39 > --- statistics 26 Oct 2003 01:22:17 -0000 1.40 > *************** > *** 25,34 **** > # call it once a day. > > - # Set library paths in @INC, at compile time > - BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > - > - # 'Use locale' for internationalisation of Perl regexes - > - # main locale settings are done in TWiki::setupLocale > BEGIN { > # Do a dynamic 'use locale' for this module > if( $TWiki::useLocale ) { > --- 25,39 ---- > # call it once a day. > > BEGIN { > + # Set default current working directory > + if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > + chdir $1; > + } > + # Set library paths in @INC at compile time > + unshift @INC, '.'; > + require 'setlib.cfg'; > + > + # 'Use locale' for internationalisation of Perl regexes - > + # main locale settings are done in TWiki::setupLocale > # Do a dynamic 'use locale' for this module > if( $TWiki::useLocale ) { > > Index: testenv > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/testenv,v > retrieving revision 1.55 > retrieving revision 1.56 > diff -C2 -r1.55 -r1.56 > *** testenv 6 Oct 2003 10:55:52 -0000 1.55 > --- testenv 26 Oct 2003 01:22:18 -0000 1.56 > *************** > *** 28,33 **** > my $brokenTWikiCfg; > > ! # Set library paths in @INC, read TWiki.cfg and set locale, at compile > time > ! BEGIN { > # Try to use setlib.cfg, use default path if missing > if ( -r './setlib.cfg' ) { > --- 28,38 ---- > my $brokenTWikiCfg; > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! > ! # Set library paths in @INC, read TWiki.cfg and set locale, at > compile time > # Try to use setlib.cfg, use default path if missing > if ( -r './setlib.cfg' ) { > > Index: upload > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/upload,v > retrieving revision 1.45 > retrieving revision 1.46 > diff -C2 -r1.45 -r1.46 > *** upload 14 Sep 2003 06:45:10 -0000 1.45 > --- upload 26 Oct 2003 01:22:18 -0000 1.46 > *************** > *** 17,26 **** > # http://www.gnu.org/copyleft/gpl.html > > - # Set library paths in @INC, at compile time > - BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > - > - # 'Use locale' for internationalisation of Perl regexes - > - # main locale settings are done in TWiki::setupLocale > BEGIN { > # Do a dynamic 'use locale' for this module > if( $TWiki::useLocale ) { > --- 17,31 ---- > # http://www.gnu.org/copyleft/gpl.html > > BEGIN { > + # Set default current working directory > + if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > + chdir $1; > + } > + # Set library paths in @INC at compile time > + unshift @INC, '.'; > + require 'setlib.cfg'; > + > + # 'Use locale' for internationalisation of Perl regexes - > + # main locale settings are done in TWiki::setupLocale > # Do a dynamic 'use locale' for this module > if( $TWiki::useLocale ) { > > Index: view > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/view,v > retrieving revision 1.59 > retrieving revision 1.60 > diff -C2 -r1.59 -r1.60 > *** view 30 Jan 2003 08:23:28 -0000 1.59 > --- view 26 Oct 2003 01:22:18 -0000 1.60 > *************** > *** 21,26 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg' } > > use CGI::Carp qw( fatalsToBrowser ); > --- 21,33 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory (needed for mod_perl) > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC, at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw( fatalsToBrowser ); > > Index: viewfile > =================================================================== > RCS file: /cvsroot/twiki/twiki/bin/viewfile,v > retrieving revision 1.23 > retrieving revision 1.24 > diff -C2 -r1.23 -r1.24 > *** viewfile 5 Jan 2003 08:38:09 -0000 1.23 > --- viewfile 26 Oct 2003 01:22:18 -0000 1.24 > *************** > *** 17,22 **** > # http://www.gnu.org/copyleft/gpl.html > > ! # Set library paths in @INC, at compile time > ! BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } > > use CGI::Carp qw(fatalsToBrowser); > --- 17,29 ---- > # http://www.gnu.org/copyleft/gpl.html > > ! BEGIN { > ! # Set default current working directory > ! if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ > /^(.+)\/[^\/]+$/ ) { > ! chdir $1; > ! } > ! # Set library paths in @INC at compile time > ! unshift @INC, '.'; > ! require 'setlib.cfg'; > ! } > > use CGI::Carp qw(fatalsToBrowser); > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > TWiki-Dev mailing list > TWi...@li... > https://lists.sourceforge.net/lists/listinfo/twiki-dev > |