Some refactoring and small changes:
- Use webObjectsSvc.GetServerManager() - Do not make any changes if the PHP5 handler is not changed in the UI - Added text on IIS70_Settings page to inform that the PHP5 Executable Path can be ignored
This commit is contained in:
parent
d7ac9fa36f
commit
170b4da51d
5 changed files with 62 additions and 45 deletions
|
@ -278,34 +278,5 @@ namespace WebsitePanel.Providers.Web.Handlers
|
|||
srvman.CommitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
internal void MoveHandlerToTop(string handlerName, string siteName, string vDirPath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(siteName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(vDirPath))
|
||||
{
|
||||
vDirPath = "/";
|
||||
}
|
||||
|
||||
using (var srvman = GetServerManager())
|
||||
{
|
||||
var config = srvman.GetWebConfiguration(siteName, vDirPath);
|
||||
|
||||
var handlersSection = (HandlersSection)config.GetSection(Constants.HandlersSection, typeof(HandlersSection));
|
||||
|
||||
var handlersCollection = handlersSection.Handlers;
|
||||
|
||||
var handlerElement = handlersCollection[handlerName];
|
||||
|
||||
handlersCollection.Remove(handlerElement);
|
||||
handlersCollection.AddCopyAt(0, handlerElement);
|
||||
|
||||
srvman.CommitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue