mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing a "null" slug suggestion bug
- When the title was empty, null was suggested --HG-- branch : dev
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Orchard.Core.Common.Controllers {
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Slugify(string contentType, int? id, int? containerId) {
|
||||
var slug = "";
|
||||
const string slug = "";
|
||||
ContentItem contentItem = null;
|
||||
|
||||
if (string.IsNullOrEmpty(contentType))
|
||||
@@ -33,7 +33,7 @@ namespace Orchard.Core.Common.Controllers {
|
||||
|
||||
_contentManager.UpdateEditorModel(contentItem, this);
|
||||
|
||||
return Json(contentItem.As<RoutableAspect>().Slug);
|
||||
return Json(contentItem.As<RoutableAspect>().Slug ?? slug);
|
||||
}
|
||||
|
||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||
|
Reference in New Issue
Block a user