This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ** Clean up old versions and other content from Umbraco Database | |
-- ** Compatible with SQLCE (eg run using LinqPad on an SDF file) | |
--https://gist.github.com/dampee/a8ead728165b16d49c00 | |
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance | |
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/ | |
DELETE FROM cmsPropertyData WHERE | |
versionId NOT IN (SELECT versionId FROM cmsDocument WHERE updateDate > DATEADD(m, -1, getdate()) OR published = 1 OR newest = 1) AND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" %> | |
<script runat="server"> | |
protected void RedirectClick(object sender, CommandEventArgs e) | |
{ | |
if (Page.IsValid) | |
{ | |
string url = RedirectUrl.Value; | |
//... whatever else ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Page_Load(object sender, EventArgs e) | |
{ | |
string url = GetSsoUrl(ConfigurationManager.AppSettings["FreshDesk.BaseUrl"], //including trailing slash | |
ConfigurationManager.AppSettings["FreshDesk.Secert"], user.UserName, user.Email); | |
Response.Redirect(url); | |
} | |
string GetSsoUrl(string baseUrl, string secert, string name, string email) | |
{ | |
return String.Format("{0}login/sso/?name={1}&email={2}&hash={3}", baseUrl, Server.UrlEncode(name), |
NewerOlder