Work items: 30363
This commit is contained in:
@@ -181,15 +181,41 @@ namespace umbraco.BusinessLogic.Utils
|
||||
public static IEnumerable<FileInfo> GetFilesByExtensions(this DirectoryInfo dir, bool searchSubdirs, params string[] extensions)
|
||||
{
|
||||
var allowedExtensions = new HashSet<string>(extensions, StringComparer.OrdinalIgnoreCase);
|
||||
IEnumerable<FileInfo> returnedFiles;
|
||||
IEnumerable<FileInfo> returnedFiles;
|
||||
returnedFiles = dir.GetFiles().Where(f => allowedExtensions.Contains(f.Extension));
|
||||
if (searchSubdirs)
|
||||
{
|
||||
foreach(DirectoryInfo di in dir.GetDirectories())
|
||||
foreach (DirectoryInfo di in dir.GetDirectories())
|
||||
returnedFiles.Concat(di.GetFilesByExtensions(true, extensions));
|
||||
}
|
||||
|
||||
return returnedFiles;
|
||||
}
|
||||
|
||||
public static AspNetHostingPermissionLevel GetCurrentTrustLevel()
|
||||
{
|
||||
foreach (AspNetHostingPermissionLevel trustLevel in
|
||||
new AspNetHostingPermissionLevel[] {
|
||||
AspNetHostingPermissionLevel.Unrestricted,
|
||||
AspNetHostingPermissionLevel.High,
|
||||
AspNetHostingPermissionLevel.Medium,
|
||||
AspNetHostingPermissionLevel.Low,
|
||||
AspNetHostingPermissionLevel.Minimal
|
||||
})
|
||||
{
|
||||
try
|
||||
{
|
||||
new AspNetHostingPermission(trustLevel).Demand();
|
||||
}
|
||||
catch (System.Security.SecurityException)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return trustLevel;
|
||||
}
|
||||
|
||||
return AspNetHostingPermissionLevel.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace umbraco.controls
|
||||
else
|
||||
{
|
||||
Panel ph = new Panel();
|
||||
ph.Attributes.Add("style", "padding: 0px 0px 0px 0px");
|
||||
ph.Attributes.Add("style", "padding: 0; position: relative; z-index: 101;"); // NH 4.7.1, latest styles added to support CP item: 30363
|
||||
ph.Controls.Add(pp);
|
||||
|
||||
tp.Controls.Add(ph);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace umbraco.presentation.developer.packages {
|
||||
if (!string.IsNullOrEmpty(category))
|
||||
category = "&category=" + category;
|
||||
|
||||
iframeGen.Text = "<iframe id=\"repoFrame\" frameborder=\"1\" style=\"border: none; display: block\" src=\"" + url + "?repoGuid=" + repoGuid + category + "&callback=" + Request.ServerVariables["SERVER_NAME"] + ":" + Request.ServerVariables["SERVER_PORT"] + IOHelper.ResolveUrl( SystemDirectories.Umbraco ) + "/developer/packages/proxy.htm?/" + IOHelper.ResolveUrl(SystemDirectories.Umbraco).Trim('/') + "/developer/packages/installer.aspx?repoGuid=" + repoGuid + "&version=v45&useLegacySchema=" + UmbracoSettings.UseLegacyXmlSchema.ToString() + "\"></iframe>";
|
||||
iframeGen.Text = string.Format("<iframe id=\"repoFrame\" frameborder=\"1\" style=\"border: none; display: block\" src=\"{0}?repoGuid={1}{2}&callback={3}:{4}{5}/developer/packages/proxy.htm?/{6}/developer/packages/installer.aspx?repoGuid={7}&version=v45&fullVersion={8}.{9}.{10}&useLegacySchema={11}&dotnetVersion={12}&trustLevel={13}\"></iframe>", url, repoGuid, category, Request.ServerVariables["SERVER_NAME"], Request.ServerVariables["SERVER_PORT"], IOHelper.ResolveUrl( SystemDirectories.Umbraco ), IOHelper.ResolveUrl(SystemDirectories.Umbraco).Trim('/'), repoGuid, GlobalSettings.VersionMajor, GlobalSettings.VersionMinor, GlobalSettings.VersionPatch, UmbracoSettings.UseLegacyXmlSchema.ToString(), Environment.Version, BusinessLogic.Utils.TypeFinder.GetCurrentTrustLevel() );
|
||||
}
|
||||
|
||||
#region Web Form Designer generated code
|
||||
|
||||
Reference in New Issue
Block a user