/wiki_page_versions/diff: automatically fix comparison order.
Automatically fix it so that we always compare the newer version with the wiki version, regardless of the order the pages are given in.
This commit is contained in:
@@ -20,5 +20,11 @@ class WikiPageVersionsController < ApplicationController
|
||||
|
||||
@thispage = WikiPageVersion.find(params[:thispage])
|
||||
@otherpage = WikiPageVersion.find(params[:otherpage])
|
||||
|
||||
if @thispage.id < @otherpage.id
|
||||
@thispage, @otherpage = @otherpage, @thispage
|
||||
end
|
||||
|
||||
respond_with([@thispage, @otherpage])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user