Fixed and closed #524: Diff.aspx now works even when comparing the last revision with itself.

This commit is contained in:
Dario Solera 2010-03-30 12:12:36 +00:00
parent cf537274b4
commit 725d30d082
2 changed files with 4 additions and 2 deletions

View file

@ -16,5 +16,5 @@ using System.Reflection;
// //
// You can specify all the values or you can default the Revision and Build Numbers // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.2.521")] [assembly: AssemblyVersion("3.0.2.522")]
[assembly: AssemblyFileVersion("3.0.2.521")] [assembly: AssemblyFileVersion("3.0.2.522")]

View file

@ -54,6 +54,7 @@ namespace ScrewTurn.Wiki {
if(int.TryParse(Request["Rev1"], out rev1)) { if(int.TryParse(Request["Rev1"], out rev1)) {
rev1Content = Pages.GetBackupContent(page, rev1); rev1Content = Pages.GetBackupContent(page, rev1);
rev1Text = rev1.ToString(); rev1Text = rev1.ToString();
if(rev1 >= 0 && rev1Content == null && Pages.GetBackupContent(page, rev1 - 1) != null) rev1Content = Content.GetPageContent(page, false);
if(rev1Content == null) Redirect(); if(rev1Content == null) Redirect();
} }
else { else {
@ -68,6 +69,7 @@ namespace ScrewTurn.Wiki {
if(int.TryParse(Request["Rev2"], out rev2)) { if(int.TryParse(Request["Rev2"], out rev2)) {
rev2Content = Pages.GetBackupContent(page, rev2); rev2Content = Pages.GetBackupContent(page, rev2);
rev2Text = rev2.ToString(); rev2Text = rev2.ToString();
if(rev2 >= 0 && rev2Content == null && Pages.GetBackupContent(page, rev2 - 1) != null) rev2Content = Content.GetPageContent(page, false);
if(rev2Content == null) Redirect(); if(rev2Content == null) Redirect();
} }
else { else {