Skip to content

Commit

Permalink
Merge 42cdc56 into 5f21ad9
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 21, 2013
2 parents 5f21ad9 + 42cdc56 commit cfa6371
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions misc/plugin/makerss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def xml
def file
f = @conf['makerss.file'] || 'index.rdf'
f = 'index.rdf' if f.empty?
f =~ %r|^/| ? f : "#{TDiary.document_root}/#{f}"
f =~ %r|^/| ? f : "#{document_root}/#{f}"
end

def writable?
Expand Down Expand Up @@ -137,6 +137,14 @@ def url
u = "#{base_url}#{File.basename(file)}" if u.empty?
u
end

def document_root
if @cgi.is_a?(RackCGI)
File.join(TDiary.server_root, 'public')
else
TDiary.server_root
end
end
end

@makerss_rsses << MakeRssFull::new(@conf, @cgi)
Expand All @@ -154,7 +162,7 @@ def item( seq, body, rdfsec )
def file
f = @conf['makerss.no_comments.file'] || 'no_comments.rdf'
f = 'no_comments.rdf' if f.empty?
f =~ %r|^/| ? f : "#{TDiary.document_root}/#{f}"
f =~ %r|^/| ? f : "#{document_root}/#{f}"
end

def write( encoder )
Expand Down

0 comments on commit cfa6371

Please sign in to comment.