projects
/
webpac2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r1846@llin: dpavlin | 2009-04-26 00:26:04 +0200
[webpac2]
/
vhost
/
webpac2.cgi
diff --git
a/vhost/webpac2.cgi
b/vhost/webpac2.cgi
index
84b6a16
..
8cadc19
100755
(executable)
--- a/
vhost/webpac2.cgi
+++ b/
vhost/webpac2.cgi
@@
-76,9
+76,13
@@
sub show_pager {
}
my $path = $ENV{PATH_INFO} || 'ecas';
}
my $path = $ENV{PATH_INFO} || 'ecas';
+$path =~ s{^/+}{};
+$path =~ s{/+$}{};
my $dir = $0;
$dir =~ s{/[^/]+.cgi}{};
my $dir = $0;
$dir =~ s{/[^/]+.cgi}{};
+dump_yaml( 'dir', $dir );
+
my $config = YAML::LoadFile( "$dir/$path/config.yml" );
my $database = (keys %{ $config->{databases} })[0];
my $config = YAML::LoadFile( "$dir/$path/config.yml" );
my $database = (keys %{ $config->{databases} })[0];
@@
-133,10
+137,14
@@
foreach ( @{ $db->{input} } ) {
warn "## only_input = ", dump( $only_input );
warn "## only_input = ", dump( $only_input );
+my @style = ( '../../style.css' );
+push @style, "../../$path/$path.css" if -e "$dir/$path/$path.css";
+dump_yaml( 'style', \@style );
+
print
start_html(
-title => $db->{name},
print
start_html(
-title => $db->{name},
- -style =>
'../../style.css'
,
+ -style =>
[ @style ]
,
),
h1( $db->{name} ),
qq|<div id=description>|, $db->{description}, qq|</div>|,
),
h1( $db->{name} ),
qq|<div id=description>|, $db->{description}, qq|</div>|,