Skip to content

Commit aff1aed

Browse files
committed
License checker: Make only public what really needs to be public
1 parent 27b41e4 commit aff1aed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Presentation/SmartStore.Web/Administration/Controllers/PluginController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected PluginModel PreparePluginModel(PluginDescriptor pluginDescriptor, bool
145145
if (license != null) // license\plugin has been used
146146
{
147147
model.IsLicensed = license.LicenseKey.HasValue();
148-
model.RemainingDemoUsageDays = Math.Max(license.RemainingDemoDays ?? LicenseChecker.MaxDemoDays, 0);
148+
model.RemainingDemoUsageDays = license.RemainingDemoDays;
149149
}
150150
}
151151
}
@@ -396,7 +396,7 @@ public ActionResult LicensePlugin(string systemName, LicensePluginModel model)
396396
var existingLicense = LicenseChecker.GetLicenseByKey(systemName, item.OldLicenseKey);
397397

398398
if (existingLicense != null && (item.LicenseKey.IsEmpty() || existingLicense.LicenseKey != item.LicenseKey))
399-
LicenseChecker.RemoveLicense(existingLicense);
399+
LicenseChecker.RemoveLicense(systemName, item.OldLicenseKey);
400400

401401
if (item.LicenseKey.IsEmpty() || (existingLicense != null && existingLicense.LicenseKey == item.LicenseKey))
402402
continue;

0 commit comments

Comments
 (0)