projects
/
matthijs
/
upstream
/
blosxom-plugins.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
71175ed
)
Fix nasty entry-ignoring bug in flavourpathinfo.
author
Gavin Carr
<gonzai@users.sourceforge.net>
Wed, 12 Sep 2007 12:48:32 +0000
(12:48 +0000)
committer
Gavin Carr
<gonzai@users.sourceforge.net>
Wed, 12 Sep 2007 12:48:32 +0000
(12:48 +0000)
gavinc/flavourpathinfo
patch
|
blob
|
history
diff --git
a/gavinc/flavourpathinfo
b/gavinc/flavourpathinfo
index 6ab1b9c660a836de4752db5b0e7bb7312a202f6b..28ea749e7a69973f3232952e2321d65b7026a332 100644
(file)
--- a/
gavinc/flavourpathinfo
+++ b/
gavinc/flavourpathinfo
@@
-1,7
+1,8
@@
# Blosxom Plugin: flavourpathinfo
# Author(s): Gavin Carr <gavin@openfusion.com.au>
# Blosxom Plugin: flavourpathinfo
# Author(s): Gavin Carr <gavin@openfusion.com.au>
-# Version: 0.00200
0
+# Version: 0.00200
1
# Documentation: 'perldoc flavourpathinfo'
# Documentation: 'perldoc flavourpathinfo'
+# Follows: extensionless
package flavourpathinfo;
package flavourpathinfo;
@@
-24,12
+25,16
@@
sub debug {
sub start {
my $path_info = $blosxom::path_info;
sub start {
my $path_info = $blosxom::path_info;
- debug(1, "original path_info: $path_info");
- return 1 if -e "$blosxom::datadir/$path_info";
# Remove any trailing /
$path_info =~ s! /$ !!x;
# Remove any trailing /
$path_info =~ s! /$ !!x;
+ my $path_file = $blosxom::path_info;
+ $path_file =~ s/\.\w+$/.$blosxom::file_extension/;
+ return 1 if -e "$blosxom::datadir/$path_info" || -f "$blosxom::datadir/$path_file";
+
+ debug(1, "original path_info: $path_info");
+
# Check file/flavour variant
if ($path_info =~ m! ^ (.*) / ([^/]+) $ !x) {
my $flavour = $2;
# Check file/flavour variant
if ($path_info =~ m! ^ (.*) / ([^/]+) $ !x) {
my $flavour = $2;
@@
-111,8
+116,11
@@
map to:
=head1 USAGE
=head1 USAGE
-Should be loaded early as it manipulates $blosxom::path_info
-e.g. as 00flavourpathinfo.
+If used with the 'extensionless' plugin, it should be loaded
+*after* extensionless.
+
+But should be loaded early as it manipulates $blosxom::path_info
+e.g. as 02flavourpathinfo.
=head1 SEE ALSO
=head1 SEE ALSO