Changeset 701


Ignore:
Timestamp:
Mar 25, 2008, 2:15:21 AM (14 years ago)
Author:
andersk
Message:
Enable webadmin and use UTF-8.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • locker/deploy/bin/trac

    r700 r701  
    66use File::Path;
    77use URI::Escape;
     8use DBI;
     9use Config::IniFiles;
    810
    911setup();
     
    1315my $name=<STDIN>;
    1416chomp($name);
     17
     18my $dbh = DBI->connect("DBI:mysql:database=$sqldb;host=$sqlhost", $sqluser, $sqlpass, {RaiseError => 1});
     19$dbh->do('alter database collate utf8_general_ci');
    1520
    1621my $dbstring = "mysql://" . uri_escape($sqluser) . ":" . uri_escape($sqlpass) . "\@$sqlhost/$sqldb";
     
    4348close IN; close OUT;
    4449
     50my $cfg = Config::IniFiles->new(-file => 'tracdata/conf/trac.ini');
     51$cfg->setval('trac', 'default_charset', 'utf-8');
     52$cfg->AddSection('components');
     53$cfg->newval('components', 'webadmin.*', 'enabled');
     54$cfg->RewriteConfig();
     55
     56system(qw(/usr/bin/trac-admin tracdata permission add), $human, 'TRAC_ADMIN');
     57
    4558chmod 0777, '.htaccess';
    4659unlink '.htaccess.in';
Note: See TracChangeset for help on using the changeset viewer.