Changeset 25


Ignore:
Timestamp:
Apr 20, 2003, 6:29:22 PM (19 years ago)
Author:
kake
Message:

Use wiki.conf instead of hardcoded variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/supersearch.cgi

    r24 r25  
    2121use Data::Dumper;
    2222use File::Spec::Functions qw(:ALL);
     23use Config::Tiny;
    2324
    2425use CGI::Wiki::Store::Pg;
     
    2627use CGI::Wiki::Formatter::UseMod;
    2728
     29my $config = Config::Tiny->read('wiki.conf');
     30
    2831use vars qw($wiki_dbpath $wikimain $css $head
    2932        $wikistore $wiki_search $wiki_formatter %wikitext
    3033        $db_name $db_user $db_pass);
    3134
    32 $db_name = "ivorw";
    33 $db_user = "ivorw";
    34 $db_pass = "hackfest";
    35 $wiki_dbpath = "/home/ivorw/public_html/cgi-bin/ivorw";
    36 $wikimain = "wiki.cgi";
    37 $css = "/grubstreet/grubstreet.css";
    38 $head = "Grubstreet Search";
     35$db_name = $config->{_}->{dbname};
     36$db_user = $config->{_}->{dbuser};
     37$db_pass = $config->{_}->{dbpass};
     38$wiki_dbpath = $config->{_}->{indexing_directory};
     39$wikimain = $config->{_}->{script_name};
     40$css = $config->{_}->{stylesheet_url};
     41$head = $config->{_}->{site_name} . " Search";
    3942
    4043# sub matched_items is called with parse tree. Uses horrible subname concatenation - this
Note: See TracChangeset for help on using the changeset viewer.