Merge
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
|
||||
<add key="umbracoStorageDirectory" value="~/App_Data" />
|
||||
<add key="umbracoPath" value="~/umbraco" />
|
||||
<add key="umbracoEnableStat" value="false" />
|
||||
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
|
||||
<add key="umbracoEditXhtmlMode" value="true" />
|
||||
<add key="umbracoUseDirectoryUrls" value="false" />
|
||||
|
||||
@@ -143,22 +143,20 @@ namespace umbraco.BasePages {
|
||||
/// </summary>
|
||||
/// <param name="umbracoUserContextID">The umbraco user context ID.</param>
|
||||
/// <returns></returns>
|
||||
public static bool ValidateUserContextID(string umbracoUserContextID) {
|
||||
if ((umbracoUserContextID != "")) {
|
||||
int uid = GetUserId(umbracoUserContextID);
|
||||
long timeout = GetTimeout(umbracoUserContextID);
|
||||
public static bool ValidateUserContextID(string currentUmbracoUserContextID) {
|
||||
if ((currentUmbracoUserContextID != ""))
|
||||
{
|
||||
int uid = GetUserId(currentUmbracoUserContextID);
|
||||
long timeout = GetTimeout(currentUmbracoUserContextID);
|
||||
|
||||
if (timeout > DateTime.Now.Ticks) {
|
||||
if (timeout > DateTime.Now.Ticks)
|
||||
{
|
||||
return true;
|
||||
} else {
|
||||
// clear the usercontext id to prevent continuous logout entries
|
||||
BasePage.umbracoUserContextID = String.Empty;
|
||||
BusinessLogic.Log.Add(BusinessLogic.LogTypes.Logout, BusinessLogic.User.GetUser(uid), -1, "");
|
||||
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
return false;
|
||||
|
||||
BusinessLogic.Log.Add(BusinessLogic.LogTypes.Logout, BusinessLogic.User.GetUser(uid), -1, "");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static long GetTimeout(string umbracoUserContextID) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using umbraco.cms.businesslogic.member;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
|
||||
namespace umbraco.cms.businesslogic {
|
||||
@@ -28,11 +29,14 @@ namespace umbraco.cms.businesslogic {
|
||||
public class NewEventArgs : System.ComponentModel.CancelEventArgs { }
|
||||
|
||||
//Special Members Event args
|
||||
public class AddToCacheEventArgs : System.ComponentModel.CancelEventArgs { }
|
||||
public class RemoveFromCacheEventArgs : System.ComponentModel.CancelEventArgs { }
|
||||
public class AddGroupEventArgs : System.ComponentModel.CancelEventArgs { }
|
||||
public class RemoveGroupEventArgs : System.ComponentModel.CancelEventArgs { }
|
||||
|
||||
public class AddToCacheEventArgs : GroupEventArgs { }
|
||||
public class RemoveFromCacheEventArgs : GroupEventArgs { }
|
||||
public class AddGroupEventArgs : GroupEventArgs { }
|
||||
public class RemoveGroupEventArgs : GroupEventArgs { }
|
||||
public class GroupEventArgs : System.ComponentModel.CancelEventArgs
|
||||
{
|
||||
public int GroupId{ get; set; }
|
||||
}
|
||||
//Tree node event args
|
||||
public class NodeRenderEventArgs : System.ComponentModel.CancelEventArgs { }
|
||||
|
||||
|
||||
@@ -648,6 +648,7 @@ namespace umbraco.cms.businesslogic.member
|
||||
public void AddGroup(int GroupId)
|
||||
{
|
||||
AddGroupEventArgs e = new AddGroupEventArgs();
|
||||
e.GroupId = GroupId;
|
||||
FireBeforeAddGroup(e);
|
||||
|
||||
if (!e.Cancel)
|
||||
@@ -673,6 +674,7 @@ namespace umbraco.cms.businesslogic.member
|
||||
public void RemoveGroup(int GroupId)
|
||||
{
|
||||
RemoveGroupEventArgs e = new RemoveGroupEventArgs();
|
||||
e.GroupId = GroupId;
|
||||
FireBeforeRemoveGroup(e);
|
||||
|
||||
if (!e.Cancel)
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace umbraco.presentation
|
||||
private UmbracoResponse m_Response;
|
||||
private HttpContext m_HttpContext;
|
||||
private XmlDocument previewDocument;
|
||||
private PreviewContent _previewContent;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Umbraco context.
|
||||
@@ -102,10 +103,12 @@ namespace umbraco.presentation
|
||||
{
|
||||
if (InPreviewMode)
|
||||
{
|
||||
// zb-00004 #29956 : refactor cookies names & handling
|
||||
PreviewContent pc = new PreviewContent(new Guid(StateHelper.Cookies.Preview.GetValue()));
|
||||
pc.LoadPreviewset();
|
||||
return pc.XmlContent;
|
||||
if (_previewContent == null)
|
||||
{
|
||||
_previewContent = new PreviewContent(new Guid(StateHelper.Cookies.Preview.GetValue()));
|
||||
_previewContent.LoadPreviewset();
|
||||
}
|
||||
return _previewContent.XmlContent;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2568,13 +2568,15 @@
|
||||
<Content Include="umbraco\masterpages\umbracoPage.Master" />
|
||||
<Content Include="umbraco\masterpages\umbracoDialog.Master" />
|
||||
<Content Include="umbraco\Search\QuickSearchHandler.ashx" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Breadcrumb-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\ListSubPagesByDateAndLimit-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Media-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Paging-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Parameters-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\SelectChildrenByDocumentType-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\SiteMap-DynamicNode.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Breadcrumb.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\ListSubPagesByDateAndLimit.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Macro-Parameters.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Media.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Navigation.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\Paging.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\SelectChildrenByDocumentType.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\SiteMap.cshtml" />
|
||||
<Content Include="umbraco\scripting\templates\cshtml\UsingRelatedLinks.cshtml" />
|
||||
<None Include="umbraco\scripting\templates\py\SubpagesAsThumnbnails.py" />
|
||||
<None Include="umbraco\scripting\templates\py\SubpagesFromAChangeableSource.py" />
|
||||
<None Include="umbraco\scripting\templates\py\SubpagesFromCurrentPage.py" />
|
||||
|
||||
@@ -27,6 +27,7 @@ var values = new Dictionary<string,object>();
|
||||
values.Add("maxLevelForSitemap", maxLevelForSitemap) ;
|
||||
|
||||
var items = node.Children.Where("Visible").Where("Level <= maxLevelForSitemap", values);
|
||||
if (items.Count() > 0) {
|
||||
<ul>
|
||||
@foreach (var item in items) {
|
||||
<li>
|
||||
@@ -35,6 +36,7 @@ values.Add("maxLevelForSitemap", maxLevelForSitemap) ;
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
<div class="sitemap">
|
||||
@traverse(@Model.AncestorOrSelf())
|
||||
|
||||
@@ -191,7 +191,16 @@
|
||||
|
||||
// *** NEW KEEP ALIVE - Should be moved to app manager *** */
|
||||
var failedAttempts = 0;
|
||||
window.setInterval(keepAlive, 10000);
|
||||
var keepAliveInterval;
|
||||
beginKeepAlive();
|
||||
|
||||
function beginKeepAlive() {
|
||||
keepAliveInterval = window.setInterval(keepAlive, 10000);
|
||||
}
|
||||
function pauseKeepAlive() {
|
||||
clearInterval(keepAliveInterval);
|
||||
}
|
||||
|
||||
function keepAlive() {
|
||||
umbraco.presentation.webservices.legacyAjaxCalls.GetSecondsBeforeUserLogout(validateUserTimeout, keepAliveError);
|
||||
}
|
||||
@@ -231,13 +240,16 @@
|
||||
|
||||
function umbracoRenewSession() {
|
||||
umbraco.presentation.webservices.legacyAjaxCalls.RenewUmbracoSession(
|
||||
function () { jQuery("#logout-warning").fadeOut().removeClass('error').addClass('notice'); },
|
||||
function () {
|
||||
jQuery("#logout-warning").fadeOut().removeClass('error').addClass('notice');
|
||||
},
|
||||
umbracoShowSessionRenewModal);
|
||||
|
||||
}
|
||||
|
||||
function umbracoShowSessionRenewModal() {
|
||||
|
||||
pauseKeepAlive();
|
||||
jQuery("#logout-warning").fadeOut().removeClass('error').addClass('notice');
|
||||
|
||||
jQuery("#sessionrefreshpassword input").attr("style", "");
|
||||
@@ -274,6 +286,7 @@
|
||||
|
||||
jQuery("#sessionrefreshpassword input").val("");
|
||||
jQuery.fullmodal.close();
|
||||
beginKeepAlive();
|
||||
}
|
||||
else {
|
||||
umbracoSessionRenewCheckPasswordFail();
|
||||
|
||||
Reference in New Issue
Block a user