mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
- Minor input validation fix, nothing to see here.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042271
This commit is contained in:
@@ -63,8 +63,11 @@ namespace Orchard.Tags.Controllers {
|
||||
else {
|
||||
if (!_authorizer.Authorize(Permissions.CreateTag, T("Couldn't create tag")))
|
||||
return new HttpUnauthorizedResult();
|
||||
_tagService.CreateTag(newTagName);
|
||||
_tagService.TagContentItem(taggedContentId, newTagName);
|
||||
if (!String.IsNullOrEmpty(newTagName)) {
|
||||
_tagService.CreateTag(newTagName);
|
||||
_tagService.TagContentItem(taggedContentId, newTagName);
|
||||
}
|
||||
|
||||
}
|
||||
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||
return Redirect(returnUrl);
|
||||
|
@@ -1,7 +1,10 @@
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsAdminCreateViewModel : AdminViewModel {
|
||||
[Required, DisplayName("Name:")]
|
||||
public string TagName { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,11 @@
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsAdminEditViewModel : AdminViewModel {
|
||||
public int Id { get; set; }
|
||||
[Required, DisplayName("Name:")]
|
||||
public string TagName { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user