Skip to content

Commit

Permalink
Another backlink tweak
Browse files Browse the repository at this point in the history
git-svn-id: http://junebug.rubyforge.org/svn/wiki/trunk@97 6cb1f131-7020-0410-9d7d-f19630c53dbb
  • Loading branch information
tmyrtle committed Apr 22, 2007
1 parent 8f172c6 commit a467973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/junebug/controllers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get page_name
page_name_spc = page_name.gsub(/_/,' ')
@page = Page.find_by_title(page_name_spc)
@page_title = "Backlinks for: #{page_name_spc}"
@pages = Page.find(:all, :conditions => ["body LIKE ?", "%[[#{page_name_spc}]]%"])
@pages = Page.find(:all, :conditions => ["body LIKE ? OR body LIKE ?", "%[[#{page_name_spc}]]%", "%[[#{page_name_spc}|%"])
render :backlinks
end
end
Expand All @@ -127,7 +127,7 @@ def get
@page_title = "Orphan pages"
@pages = Page.find :all, :order => 'title'
@pages = @pages.reject do |page|
linked_pages = Page.find(:all, :conditions => ["body LIKE ?", "%[[#{page.title}]]%"]).length > 0
linked_pages = Page.find(:all, :conditions => ["body LIKE ? OR body LIKE ?", "%[[#{page.title}]]%", "%[[#{page.title}|%"]).length > 0
end
render :orphans
end
Expand Down

0 comments on commit a467973

Please sign in to comment.