projects
/
matthijs
/
upstream
/
blosxom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Perl Best Practices .perltidyrc.
[matthijs/upstream/blosxom.git]
/
blosxom.cgi
diff --git
a/blosxom.cgi
b/blosxom.cgi
index 78ad2ffcac7160a5cc41a5a1f62fc9c250ad19a3..7c669dde565a2798204ff7179dd75d1183c54388 100755
(executable)
--- a/
blosxom.cgi
+++ b/
blosxom.cgi
@@
-251,8
+251,6
@@
my @plugin_list = ();
my %plugin_hash = ();
# If $plugin_list is set, read plugins to use from that file
my %plugin_hash = ();
# If $plugin_list is set, read plugins to use from that file
-$plugin_list = "$config_dir/$plugin_list"
- if $plugin_list && $plugin_list !~ m!^\s*/!;
if ( $plugin_list and -r $plugin_list and $fh->open("< $plugin_list") ) {
@plugin_list = map { chomp $_; $_ } grep { /\S/ && !/^#/ } <$fh>;
$fh->close;
if ( $plugin_list and -r $plugin_list and $fh->open("< $plugin_list") ) {
@plugin_list = map { chomp $_; $_ } grep { /\S/ && !/^#/ } <$fh>;
$fh->close;
@@
-696,16
+694,16
@@
sub nice_date {
my ($unixtime) = @_;
my $c_time = CORE::localtime($unixtime);
my ($unixtime) = @_;
my $c_time = CORE::localtime($unixtime);
- my ( $dw, $mo, $da, $hr, $min, $yr )
+ my ( $dw, $mo, $da, $hr, $min, $
sec, $
yr )
= ( $c_time
= ( $c_time
- =~ /(\w{3}) +(\w{3}) +(\d{1,2}) +(\d{2}):(\d{2}):
\d{2}
+(\d{4})$/
+ =~ /(\w{3}) +(\w{3}) +(\d{1,2}) +(\d{2}):(\d{2}):
(\d{2})
+(\d{4})$/
);
$ti = "$hr:$min";
$da = sprintf( "%02d", $da );
my $mo_num = $month2num{$mo};
my $offset
);
$ti = "$hr:$min";
$da = sprintf( "%02d", $da );
my $mo_num = $month2num{$mo};
my $offset
- = timegm(
00
, $min, $hr, $da, $mo_num - 1, $yr - 1900 ) - $unixtime;
+ = timegm(
$sec
, $min, $hr, $da, $mo_num - 1, $yr - 1900 ) - $unixtime;
my $utc_offset = sprintf( "%+03d", int( $offset / 3600 ) )
. sprintf( "%02d", ( $offset % 3600 ) / 60 );
my $utc_offset = sprintf( "%+03d", int( $offset / 3600 ) )
. sprintf( "%02d", ( $offset % 3600 ) / 60 );