projects
/
matthijs
/
upstream
/
blosxom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid "conditional and" for preparing $path_info
[matthijs/upstream/blosxom.git]
/
blosxom.cgi
diff --git
a/blosxom.cgi
b/blosxom.cgi
index 0182001a89cb435569319d82ee6076fb8eb7e57d..b80cfbcc1b3e2c3fcb0fc0a8fa9e71df75e63406 100755
(executable)
--- a/
blosxom.cgi
+++ b/
blosxom.cgi
@@
-137,7
+137,7
@@
$url =~ s!/$!!;
$datadir =~ s!/$!!; $plugin_dir =~ s!/$!!; $static_dir =~ s!/$!!;
# Fix depth to take into account datadir's path
$datadir =~ s!/$!!; $plugin_dir =~ s!/$!!; $static_dir =~ s!/$!!;
# Fix depth to take into account datadir's path
-$depth
and $depth += ($datadir =~ tr[/][]) - 1
;
+$depth
+= ($datadir =~ tr[/][]) - 1 if $depth
;
# Global variable to be used in head/foot.{flavour} templates
$path_info = '';
# Global variable to be used in head/foot.{flavour} templates
$path_info = '';
@@
-157,7
+157,7
@@
$flavour = '';
if ( $path_info[$#path_info] =~ /(.+)\.(.+)$/ ) {
$flavour = $2;
if ( $path_info[$#path_info] =~ /(.+)\.(.+)$/ ) {
$flavour = $2;
- $
1 ne 'index' and $path_info .= "/$1.$2"
;
+ $
path_info .= "/$1.$2" if $1 ne 'index'
;
pop @path_info;
} else {
$flavour = param('flav') || $default_flavour;
pop @path_info;
} else {
$flavour = param('flav') || $default_flavour;