+v2.0.3
+ * changed plugin loading to use @INC instead of hardcoded
+ $plugin_dir
+ * added support for external config file via BLOSXOM_CONFIG_DIR
+ and/or BLOSXOM_CONFIG_FILE environment variables
+
v2.0.2
* fixed path_info to have correct extension in static mode (bug
1368882)
* changed DATA section template parsing to allow newlines for
greater readability, and to allow empty templates.
* work-around for bug in CGI::url() when using SSI
+
v2.0.1
* Fixed XML escaping of RSS feeds
* Ignore editor backup files in the plugin directory
# --------------------------------
-use vars qw! $version $blog_title $blog_description $blog_language $datadir $url %template $template $depth $num_entries $file_extension $default_flavour $static_or_dynamic $plugin_dir $plugin_state_dir @plugins %plugins $static_dir $static_password @static_flavours $static_entries $path_info $path_info_yr $path_info_mo $path_info_da $path_info_mo_num $flavour $static_or_dynamic %month2num @num2month $interpolate $entries $output $header $show_future_entries %files %indexes %others !;
+use vars qw! $version $blog_title $blog_description $blog_language $datadir $url %template $template $depth $num_entries $file_extension $default_flavour $static_or_dynamic $config_dir $plugin_dir $plugin_state_dir @plugins %plugins $static_dir $static_password @static_flavours $static_entries $path_info $path_info_yr $path_info_mo $path_info_da $path_info_mo_num $flavour $static_or_dynamic %month2num @num2month $interpolate $entries $output $header $show_future_entries %files %indexes %others !;
use strict;
use FileHandle;
$version = "2.0.2";
+# Load configuration from $ENV{BLOSXOM_CONFIG_DIR}/blosxom.conf, if it exists
+my $blosxom_config;
+if ($ENV{BLOSXOM_CONFIG_FILE} && -r $ENV{BLOSXOM_CONFIG_FILE}) {
+ $blosxom_config = $ENV{BLOSXOM_CONFIG_FILE};
+ ($config_dir = $blosxom_config) =~ s! / [^/]* $ !!x;
+}
+else {
+ for my $blosxom_config_dir ($ENV{BLOSXOM_CONFIG_DIR}, '/etc/blosxom', '/etc') {
+ if (-r "$blosxom_config_dir/blosxom.conf") {
+ $config_dir = $blosxom_config_dir;
+ $blosxom_config = "$blosxom_config_dir/blosxom.conf";
+ last;
+ }
+ }
+}
+# Load $blosxom_config
+if ($blosxom_config) {
+ if (-r $blosxom_config) {
+ eval { require $blosxom_config } or
+ warn "Error reading blosxom config file '$blosxom_config'" . ($@ ? ": $@" : '');
+ }
+ else {
+ warn "Cannot find or read blosxom config file '$blosxom_config'";
+ }
+}
+
my $fh = new FileHandle;
%month2num = (nil=>'00', Jan=>'01', Feb=>'02', Mar=>'03', Apr=>'04', May=>'05', Jun=>'06', Jul=>'07', Aug=>'08', Sep=>'09', Oct=>'10', Nov=>'11', Dec=>'12');