don't put voting widgets on redirect pages
This commit is contained in:
parent
93c56fdb84
commit
69b03a4361
8
start.rb
8
start.rb
|
@ -14,11 +14,15 @@ config["sites"].each do |site|
|
|||
puts page['title']
|
||||
page_text = wiki.get_text(page['title']).body.force_encoding("UTF-8")
|
||||
changed = false
|
||||
if not page_text.include?("<vote type=1 />") then
|
||||
if not page_text.include?("<vote type=1 />") and
|
||||
not page_text.include("REDIRECT")
|
||||
then
|
||||
page_text = page_text + "\n\n<vote type=1 />"
|
||||
changed = true
|
||||
end
|
||||
if not page_text.include?("<iusethis />") then
|
||||
if not page_text.include?("<iusethis />") and
|
||||
not page_text.include("REDIRECT")
|
||||
then
|
||||
page_text = page_text + "\n\n<iusethis />"
|
||||
changed = true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue