Browse Source

DBIsOutdatedException implemented

main
Inga 🏳‍🌈 11 years ago
parent
commit
2f3ca29639
  1. 2
      Builder/IISMainHandler/build.txt
  2. 4
      FLocal.IISHandler/MainHandler.cs
  3. 14
      Patcher.Web/DBIsOutdatedException.cs
  4. 1
      Patcher.Web/Patcher.Web.csproj
  5. 6
      Patcher.Web/PatcherInfo.cs

2
Builder/IISMainHandler/build.txt

@ -1 +1 @@ @@ -1 +1 @@
2039
2053

4
FLocal.IISHandler/MainHandler.cs

@ -19,9 +19,7 @@ namespace FLocal.IISHandler { @@ -19,9 +19,7 @@ namespace FLocal.IISHandler {
private void doProcessRequest(HttpContext httpcontext) {
if(PatcherInfo.instance.IsNeedsPatching) {
throw new FLocalException("DB is outdated");
}
PatcherInfo.instance.CheckDBUpToDate();
Uri current = httpcontext.Request.Url;
if(!current.Host.EndsWith(Config.instance.BaseHost)) {

14
Patcher.Web/DBIsOutdatedException.cs

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Patcher.Web {
class DBIsOutdatedException : ApplicationException {
public DBIsOutdatedException()
: base("DB is outdated") {
}
}
}

1
Patcher.Web/Patcher.Web.csproj

@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CheckParams.cs" />
<Compile Include="DBIsOutdatedException.cs" />
<Compile Include="InteractiveResponseStream.cs" />
<Compile Include="MainHandler.cs" />
<Compile Include="IPatcherConfiguration.cs" />

6
Patcher.Web/PatcherInfo.cs

@ -23,6 +23,12 @@ namespace Patcher.Web { @@ -23,6 +23,12 @@ namespace Patcher.Web {
}
}
public void CheckDBUpToDate() {
if(this.IsNeedsPatching) {
throw new DBIsOutdatedException();
}
}
internal void PatchesInstalled() {
this.AreNewPatchesInstalled = true;
}

Loading…
Cancel
Save