fixed bugs
This commit is contained in:
parent
ff9e257362
commit
2af6f848bb
12 changed files with 554 additions and 99 deletions
|
@ -3752,17 +3752,33 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
public override bool GetDirectoryBrowseEnabled(string siteId)
|
||||
{
|
||||
using (ServerManager srvman = webObjectsSvc.GetServerManager())
|
||||
{
|
||||
var enabled = dirBrowseSvc.GetDirectoryBrowseSettings(srvman, siteId)[DirectoryBrowseGlobals.Enabled];
|
||||
var uri = new Uri(siteId);
|
||||
var host = uri.Host;
|
||||
var site = uri.Host + uri.PathAndQuery;
|
||||
|
||||
return enabled != null ? (bool)enabled : false;
|
||||
if (SiteExists(host))
|
||||
{
|
||||
using (ServerManager srvman = webObjectsSvc.GetServerManager())
|
||||
{
|
||||
var enabled = dirBrowseSvc.GetDirectoryBrowseSettings(srvman, site)[DirectoryBrowseGlobals.Enabled];
|
||||
|
||||
return enabled != null ? (bool)enabled : false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void SetDirectoryBrowseEnabled(string siteId, bool enabled)
|
||||
{
|
||||
dirBrowseSvc.SetDirectoryBrowseEnabled(siteId, enabled);
|
||||
var uri = new Uri(siteId);
|
||||
var host = uri.Host;
|
||||
var site = uri.Host + uri.PathAndQuery;
|
||||
|
||||
if (SiteExists(host))
|
||||
{
|
||||
dirBrowseSvc.SetDirectoryBrowseEnabled(site, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue