Fix incorrect condition

--HG--
branch : 1.x
This commit is contained in:
Renaud Paquay
2011-05-26 20:41:02 -07:00
parent 7084ecbbbc
commit 852d21fee9

View File

@@ -29,9 +29,11 @@ namespace Orchard.Core.Settings.Commands {
[OrchardSwitches("BaseUrl")]
public string SetBaseUrl() {
// Don't do anything if set and not forcing
if (Force == false && string.IsNullOrEmpty(_siteService.GetSiteSettings().BaseUrl)) {
Context.Output.WriteLine(T("'BaseUrl' site setting is already set. Use the 'Force' flag to override."));
return null;
if (!string.IsNullOrEmpty(_siteService.GetSiteSettings().BaseUrl)) {
if (!Force) {
Context.Output.WriteLine(T("'BaseUrl' site setting is already set. Use the 'Force' flag to override."));
return null;
}
}
// Retrieve request URL if BaseUrl not provided as a switch value