Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added logger instance for Filter/Plugin class.

git-svn-id: https://tdiary.svn.sourceforge.net/svnroot/tdiary/trunk/core@3550 7f22e88f-374d-0410-998f-c91420d97ba2
  • Loading branch information...
commit b69f47f4ffbbf99c2155295c2c497b7155aa29ae 1 parent 56fe3a4
hsbt authored
Showing with 6 additions and 5 deletions.
  1. +1 −1  plugin/60sf.rb
  2. +5 −4 tdiary.rb
View
2  plugin/60sf.rb
@@ -129,7 +129,7 @@ def sf_list_plugins( sf_opt )
if File.readable?( path ) then
begin
require path
- @sf_filters << TDiary::Filter::const_get("#{File::basename(filename, ".rb").capitalize}Filter")::new(@cgi, @conf)
+ @sf_filters << TDiary::Filter::const_get("#{File::basename(filename, ".rb").capitalize}Filter")::new(@cgi, @conf, @logger)
plugin_path = "#{dir}/plugin/#{filename}"
load_plugin(plugin_path) if File.readable?(plugin_path)
rescue Exception
View
9 tdiary.rb
@@ -312,8 +312,8 @@ class Filter
DEBUG_SPAM = 1
DEBUG_FULL = 2
- def initialize( cgi, conf )
- @cgi, @conf = cgi, conf
+ def initialize( cgi, conf, logger )
+ @cgi, @conf, @logger = cgi, conf, logger
if @conf.options.include?('filter.debug_mode')
@debug_mode = @conf.options['filter.debug_mode']
@@ -1161,7 +1161,8 @@ def load_plugins
'cache_path' => cache_path,
'date' => @date,
'comment' => @comment,
- 'last_modified' => last_modified
+ 'last_modified' => last_modified,
+ 'logger' => @logger
)
end
@@ -1263,7 +1264,7 @@ def load_filters
filter_path = @conf.filter_path || "#{PATH}/tdiary/filter"
Dir::glob( "#{filter_path}/*.rb" ).sort.each do |file|
require file.untaint
- @filters << TDiary::Filter::const_get( "#{File::basename( file, '.rb' ).capitalize}Filter" )::new( @cgi, @conf )
+ @filters << TDiary::Filter::const_get( "#{File::basename( file, '.rb' ).capitalize}Filter" )::new( @cgi, @conf, @logger )
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.