Changeset 263

Show
Ignore:
Timestamp:
11/01/03 21:38:33 (5 years ago)
Author:
kake
Message:

Allow SQLite databases, fixed navbar prompt bug, bumped version number

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r245 r263  
    9797my @answers; 
    9898 
    99 # Database type is speshull - can be one of two. 
     99# Database type is speshull - can be one of three. 
    100100my $dbtype; 
    101 my $dbtype_qu = "what type of database do you want the site to run on?  postgres/mysql"; 
     101my $dbtype_qu = "what type of database do you want the site to run on?  postgres/mysql/sqlite"; 
    102102if ( $skip_config ) { 
    103103    $dbtype = $existing_config{dbtype} || "postgres"; 
     
    109109        $dbtype =~ s/^\s*//; 
    110110        $dbtype =~ s/\s*$//; 
    111         unless ( $dbtype eq "postgres" or $dbtype eq "mysql" ) { 
     111        unless ( $dbtype eq "postgres" or $dbtype eq "mysql" 
     112                 or $dbtype eq "sqlite" ) { 
    112113            undef $dbtype; 
    113114        } 
     
    117118# Check they have the relevant DBD driver installed. 
    118119my %drivers = ( postgres => "DBD::Pg", 
    119                 mysql    => "DBD::mysql" ); 
     120                mysql    => "DBD::mysql", 
     121                sqlite   => "DBD::SQLite", 
     122              ); 
    120123eval "require $drivers{$dbtype}"; 
    121124die "$drivers{$dbtype} is needed to run a $dbtype database" if $@; 
     
    131134    my $def = $existing_config{$var} || $qset->{default}; 
    132135    my $val = $def; 
     136 
     137    if ( $dbtype eq "sqlite" and $var eq "dbname" ) { 
     138        $qu = "what's the full filename of the SQLite database this site runs on?"; 
     139    } 
     140 
     141    if ( $dbtype eq "sqlite" and 
     142         ( $var eq "dbuser" or $var eq "dbpass" or $var eq "dbhost" ) 
     143       ) { 
     144        print "$var not relevant for SQLite... skipping...\n"; 
     145        push @answers, { question => $qu, 
     146                         variable => $var, 
     147                         value    => "not-used" }; 
     148        next; 
     149    } 
     150 
    133151    unless ( $skip_config ) { 
    134152        if ( $type eq "y_n" ) { 
     153            $def = $def ? "y" : "n"; 
    135154            $val = Module::Build->y_n("\n$qu ", $def); 
    136155        } else { 
  • trunk/Changes

    r261 r263  
     10.28     
     2        Allow running sites on SQLite databases. 
     3        Fixed bug with navbar prompt in Build.PL (CPAN RT #3894). 
     4 
    150.27    1 November 2003 
    26        Fixed bug with category/locale indexing - no longer case-sensitive. 
  • trunk/lib/OpenGuides.pm

    r252 r263  
    44use vars qw( $VERSION ); 
    55 
    6 $VERSION = '0.27'; 
     6$VERSION = '0.28'; 
    77 
    88=head1 NAME 
  • trunk/lib/OpenGuides/Utils.pm

    r231 r263  
    5959                          postgres => "Pg", 
    6060                          mysql    => "MySQL", 
    61                           sqlite   => "SQLite", # used for testing 
     61                          sqlite   => "SQLite", 
    6262                        ); 
    6363 
  • trunk/wiki.cgi

    r252 r263  
    55 
    66use vars qw( $VERSION ); 
    7 $VERSION = '0.27'; 
     7$VERSION = '0.28'; 
    88 
    99use CGI qw/:standard/;