Fixed help files.
This commit is contained in:
commit
b8f912cc79
1543 changed files with 395123 additions and 0 deletions
43
WebApplication/SessionRefresh.aspx.cs
Normal file
43
WebApplication/SessionRefresh.aspx.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using ScrewTurn.Wiki.PluginFramework;
|
||||
|
||||
namespace ScrewTurn.Wiki {
|
||||
|
||||
public partial class SessionRefresh : BasePage {
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e) {
|
||||
// Manage the case when the application is for some reason restarted
|
||||
// during the editing of a Page or File
|
||||
|
||||
if(Request["Page"] != null) {
|
||||
PageInfo page = Pages.FindPage(Request["Page"]);
|
||||
if(page == null) return;
|
||||
else {
|
||||
// The system already authenticates the user, if any, at the request level
|
||||
string username = Request.UserHostAddress;
|
||||
if(SessionFacade.LoginKey != null) username = SessionFacade.CurrentUsername;
|
||||
Collisions.RenewEditingSession(page, username);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void PrintRefresh() {
|
||||
Response.Write(@"<meta http-equiv=""refresh"" content=""");
|
||||
Response.Write(Collisions.EditingSessionTimeout.ToString());
|
||||
Response.Write(@""" />");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue