Work items: 30110
This commit is contained in:
@@ -1,180 +1,189 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settings>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
should be set to false if the aspnet account hasn't got readrights of the driveroot up to the /media directory -->
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>True</TidyEditorContent>
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>True</TidyEditorContent>
|
||||
|
||||
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>UTF8</TidyCharEncoding>
|
||||
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>UTF8</TidyCharEncoding>
|
||||
|
||||
<!-- to enable new content schema, this needs to be false -->
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
<!-- to enable new content schema, this needs to be false -->
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
</content>
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
</content>
|
||||
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
</templates>
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
|
||||
<scripting>
|
||||
<razor>
|
||||
<!-- razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml -->
|
||||
<notDynamicXmlDocumentElements>
|
||||
<element>p</element>
|
||||
<element>div</element>
|
||||
</notDynamicXmlDocumentElements>
|
||||
</razor>
|
||||
</scripting>
|
||||
|
||||
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
|
||||
<viewstateMoverModule enable="false" />
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
</templates>
|
||||
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
<!-- this is used by Umbraco to determine if there's valid classes in the /App_Code folder to be used for Rest/XSLT extensions -->
|
||||
<developer>
|
||||
<appCodeFileExtensions>
|
||||
<ext>cs</ext>
|
||||
<ext>vb</ext>
|
||||
</appCodeFileExtensions>
|
||||
</developer>
|
||||
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="False">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>your-username</documentServiceUsers>
|
||||
<fileServiceUsers>your-username</fileServiceUsers>
|
||||
<stylesheetServiceUsers>your-username</stylesheetServiceUsers>
|
||||
<memberServiceUsers>your-username</memberServiceUsers>
|
||||
<templateServiceUsers>your-username</templateServiceUsers>
|
||||
<!-- type of files (extensions) that are allowed for the file service -->
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
</webservices>
|
||||
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
<scripting>
|
||||
<razor>
|
||||
<!-- razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml -->
|
||||
<notDynamicXmlDocumentElements>
|
||||
<element>p</element>
|
||||
<element>div</element>
|
||||
</notDynamicXmlDocumentElements>
|
||||
</razor>
|
||||
</scripting>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
|
||||
<viewstateMoverModule enable="false" />
|
||||
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="False">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>your-username</documentServiceUsers>
|
||||
<fileServiceUsers>your-username</fileServiceUsers>
|
||||
<stylesheetServiceUsers>your-username</stylesheetServiceUsers>
|
||||
<memberServiceUsers>your-username</memberServiceUsers>
|
||||
<templateServiceUsers>your-username</templateServiceUsers>
|
||||
<!-- type of files (extensions) that are allowed for the file service -->
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
</webservices>
|
||||
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
</settings>
|
||||
|
||||
@@ -860,6 +860,24 @@ namespace umbraco
|
||||
}
|
||||
}
|
||||
|
||||
public static XmlNode AppCodeFileExtensions
|
||||
{
|
||||
get
|
||||
{
|
||||
XmlNode value = GetKeyAsNode("/settings/developer/appCodeFileExtensions");
|
||||
if (value != null)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
// default is .cs and .vb
|
||||
value = _umbracoSettings.CreateElement("appCodeFileExtensions");
|
||||
value.AppendChild(xmlHelper.addTextNode(_umbracoSettings, "ext", "cs"));
|
||||
value.AppendChild(xmlHelper.addTextNode(_umbracoSettings, "ext", "vb"));
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tells us whether the Xml to always update disk cache, when changes are made to content
|
||||
/// Default is enabled
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Reflection;
|
||||
using System.Web;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using umbraco.IO;
|
||||
|
||||
namespace umbraco.BusinessLogic.Utils
|
||||
@@ -36,8 +37,13 @@ namespace umbraco.BusinessLogic.Utils
|
||||
}
|
||||
|
||||
// also add types from app_code, if any
|
||||
List<string> allowedExt = new List<string>();
|
||||
foreach (XmlNode x in UmbracoSettings.AppCodeFileExtensions)
|
||||
if (!String.IsNullOrEmpty(x.Value))
|
||||
allowedExt.Add(x.Value);
|
||||
|
||||
DirectoryInfo appCodeFolder = new DirectoryInfo(IOHelper.MapPath(IOHelper.ResolveUrl("~/App_code")));
|
||||
if (appCodeFolder.Exists && appCodeFolder.GetFiles().Length > 0)
|
||||
if (appCodeFolder.Exists && appCodeFolder.GetFilesByExtensions(allowedExt.ToArray()).Count() > 0)
|
||||
{
|
||||
types.AddRange(FindClassesMarkedWithAttribute(Assembly.Load("App_Code"), attribute));
|
||||
}
|
||||
@@ -45,29 +51,29 @@ namespace umbraco.BusinessLogic.Utils
|
||||
return types.Distinct();
|
||||
}
|
||||
|
||||
static IEnumerable<Type> FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
|
||||
{
|
||||
try
|
||||
{
|
||||
return assembly.GetTypes().Where(type => type.GetCustomAttributes(attribute, true).Length > 0);
|
||||
}
|
||||
catch (ReflectionTypeLoadException ex)
|
||||
{
|
||||
if (GlobalSettings.DebugMode)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendFormat("Unable to load one or more of the types in assembly '{0}'. Exceptions were thrown:", assembly.FullName);
|
||||
foreach (Exception e in ex.LoaderExceptions)
|
||||
sb.AppendFormat("\n{0}: {1}", e.GetType().FullName, e.Message);
|
||||
throw new Exception(sb.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
// return the types that were loaded, ignore those that could not be loaded
|
||||
return ex.Types;
|
||||
}
|
||||
}
|
||||
}
|
||||
static IEnumerable<Type> FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
|
||||
{
|
||||
try
|
||||
{
|
||||
return assembly.GetTypes().Where(type => type.GetCustomAttributes(attribute, true).Length > 0);
|
||||
}
|
||||
catch (ReflectionTypeLoadException ex)
|
||||
{
|
||||
if (GlobalSettings.DebugMode)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendFormat("Unable to load one or more of the types in assembly '{0}'. Exceptions were thrown:", assembly.FullName);
|
||||
foreach (Exception e in ex.LoaderExceptions)
|
||||
sb.AppendFormat("\n{0}: {1}", e.GetType().FullName, e.Message);
|
||||
throw new Exception(sb.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
// return the types that were loaded, ignore those that could not be loaded
|
||||
return ex.Types;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Searches all loaded assemblies for classes of the type passed in.
|
||||
@@ -104,7 +110,7 @@ namespace umbraco.BusinessLogic.Utils
|
||||
string binFolder = Path.Combine(IO.IOHelper.MapPath("/", false), "bin");
|
||||
string[] strTypes = TypeResolver.GetAssignablesFromType<T>(binFolder, "*.dll");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
List<Type> types = new List<Type>();
|
||||
@@ -171,5 +177,11 @@ namespace umbraco.BusinessLogic.Utils
|
||||
{
|
||||
return t => (type.IsAssignableFrom(t) && (onlyConcreteClasses ? (t.IsClass && !t.IsAbstract) : true));
|
||||
}
|
||||
|
||||
public static IEnumerable<FileInfo> GetFilesByExtensions(this DirectoryInfo dir, params string[] extensions)
|
||||
{
|
||||
var allowedExtensions = new HashSet<string>(extensions, StringComparer.OrdinalIgnoreCase);
|
||||
return dir.GetFiles().Where(f => allowedExtensions.Contains(f.Extension));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,160 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settings>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
should be set to false if the aspnet account hasn't got readrights of the driveroot up to the /media directory -->
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>
|
||||
<errorPage culture="default">1134</errorPage>
|
||||
<errorPage culture="en-US">1135</errorPage>
|
||||
<errorPage culture="en-UK">1135</errorPage>
|
||||
</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>robot@umbraco.dk</email>
|
||||
</notifications>
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>
|
||||
<errorPage culture="default">1134</errorPage>
|
||||
<errorPage culture="en-US">1135</errorPage>
|
||||
<errorPage culture="en-UK">1135</errorPage>
|
||||
</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>robot@umbraco.dk</email>
|
||||
</notifications>
|
||||
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>False</TidyEditorContent>
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>False</TidyEditorContent>
|
||||
|
||||
<!-- the encoding type for tidy. Default is Raw, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>Raw</TidyCharEncoding>
|
||||
<!-- the encoding type for tidy. Default is Raw, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>Raw</TidyCharEncoding>
|
||||
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
|
||||
</content>
|
||||
</content>
|
||||
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>false</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
<enableSkinSupport>true</enableSkinSupport>
|
||||
</templates>
|
||||
<viewstateMoverModule enable="false" />
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>false</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
<enableSkinSupport>true</enableSkinSupport>
|
||||
</templates>
|
||||
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<autoCleanLogs>falses</autoCleanLogs>
|
||||
<cleaningMiliseconds>86400</cleaningMiliseconds>
|
||||
<maxLogAge>1440</maxLogAge>
|
||||
</logging>
|
||||
<!-- this is used by Umbraco to determine if there's valid classes in the /App_Code folder to be used for Rest/XSLT extensions -->
|
||||
<developer>
|
||||
<appCodeFileExtensions>
|
||||
<ext>cs</ext>
|
||||
<ext>vb</ext>
|
||||
</appCodeFileExtensions>
|
||||
</developer>
|
||||
|
||||
<viewstateMoverModule enable="false" />
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<autoCleanLogs>falses</autoCleanLogs>
|
||||
<cleaningMiliseconds>86400</cleaningMiliseconds>
|
||||
<maxLogAge>1440</maxLogAge>
|
||||
</logging>
|
||||
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="True">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>umbraco</documentServiceUsers>
|
||||
<fileServiceUsers>umbraco</fileServiceUsers>
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
<stylesheetServiceUsers>umbraco</stylesheetServiceUsers>
|
||||
<memberServiceUsers>umbraco</memberServiceUsers>
|
||||
<templateServiceUsers>umbraco</templateServiceUsers>
|
||||
</webservices>
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="True">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>umbraco</documentServiceUsers>
|
||||
<fileServiceUsers>umbraco</fileServiceUsers>
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
<stylesheetServiceUsers>umbraco</stylesheetServiceUsers>
|
||||
<memberServiceUsers>umbraco</memberServiceUsers>
|
||||
<templateServiceUsers>umbraco</templateServiceUsers>
|
||||
</webservices>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
</settings>
|
||||
@@ -3217,9 +3217,9 @@
|
||||
<Folder Include="css\" />
|
||||
<Folder Include="data\previews\" />
|
||||
<Folder Include="data\preview\" />
|
||||
<Folder Include="macroScripts\" />
|
||||
<Folder Include="masterpages\" />
|
||||
<Folder Include="media\" />
|
||||
<Folder Include="python\" />
|
||||
<Folder Include="umbraco\ActionHandlers\scripts\" />
|
||||
<Folder Include="umbraco\imaging\" />
|
||||
<Folder Include="umbraco\library\" />
|
||||
|
||||
@@ -330,12 +330,16 @@ namespace umbraco.NodeFactory
|
||||
|
||||
public static Node GetNodeByXpath(string xpath)
|
||||
{
|
||||
XPathNodeIterator xpathNode = library.GetXmlNodeByXPath(xpath);
|
||||
XmlNode n = ((IHasXmlNode) xpathNode.Current).GetNode();
|
||||
if (n != null) {
|
||||
return new Node(n);
|
||||
XPathNodeIterator itNode = library.GetXmlNodeByXPath(xpath);
|
||||
XmlNode nodeXmlNode = null;
|
||||
if (itNode.MoveNext())
|
||||
{
|
||||
nodeXmlNode = ((IHasXmlNode)itNode.Current).GetNode();
|
||||
}
|
||||
if (nodeXmlNode != null)
|
||||
{
|
||||
return new Node(nodeXmlNode);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
<Examine configSource="config\ExamineSettings.config" />
|
||||
<ExamineLuceneIndexSets configSource="config\ExamineIndex.config" />
|
||||
<appSettings>
|
||||
<add key="umbracoDbDSN" value="server=.\sqlexpress;database=v46;user id=umbracouser;password=farmer" />
|
||||
<add key="umbracoConfigurationStatus" value="" />
|
||||
<add key="umbracoDbDSN" value="server=.\sqlexpress;database=v452;integrated security=false;user id=DBUSER;password=DBPASSWORD" />
|
||||
<add key="umbracoConfigurationStatus" value="4.5.2.beta" />
|
||||
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
|
||||
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
|
||||
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
|
||||
@@ -64,7 +64,7 @@
|
||||
-->
|
||||
<add key="umbracoContentXMLUseLocalTemp" value="false" />
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<add key="webPages:Enabled" value="false" />
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="enableSimpleMembership" value="false" />
|
||||
<add key="autoFormsAuthentication" value="false" />
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
@@ -178,12 +178,16 @@
|
||||
<remove name="viewstateMoverModule" />
|
||||
<remove name="umbracoBaseRequestModule" />
|
||||
<remove name="ClientDependencyModule" />
|
||||
<!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
|
||||
<remove name="FormsAuthentication" />
|
||||
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
|
||||
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
|
||||
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />
|
||||
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
|
||||
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
|
||||
<!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Read, Write, Script, Execute">
|
||||
<remove name="WebServiceHandlerFactory-Integrated" />
|
||||
|
||||
Reference in New Issue
Block a user