Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
0bb225bd
Commit
0bb225bd
authored
Mar 28, 2015
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在分割标签时可以使用中文逗号
parent
6b61c3cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
core/src/main/java/org/b3log/solo/service/ArticleMgmtService.java
.../main/java/org/b3log/solo/service/ArticleMgmtService.java
+7
-3
pom.xml
pom.xml
+2
-2
No files found.
core/src/main/java/org/b3log/solo/service/ArticleMgmtService.java
View file @
0bb225bd
...
...
@@ -58,7 +58,7 @@ import org.json.JSONObject;
* Article management service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.
0.1.6, Oct 26, 2013
* @version 1.
1.1.6, Mar 28, 2015
* @since 0.3.5
*/
@Service
...
...
@@ -274,11 +274,13 @@ public class ArticleMgmtService {
try
{
final
JSONObject
article
=
requestJSONObject
.
getJSONObject
(
ARTICLE
);
final
String
tagsString
=
article
.
optString
(
Article
.
ARTICLE_TAGS_REF
);
article
.
put
(
Article
.
ARTICLE_TAGS_REF
,
tagsString
.
replaceAll
(
","
,
","
));
final
String
articleId
=
article
.
getString
(
Keys
.
OBJECT_ID
);
// Set permalink
final
JSONObject
oldArticle
=
articleRepository
.
get
(
articleId
);
final
String
permalink
=
getPermalinkForUpdateArticle
(
oldArticle
,
article
,
(
Date
)
oldArticle
.
get
(
ARTICLE_CREATE_DATE
));
article
.
put
(
ARTICLE_PERMALINK
,
permalink
);
processTagsForArticleUpdate
(
oldArticle
,
article
);
...
...
@@ -462,7 +464,9 @@ public class ArticleMgmtService {
try
{
// Step 1: Add tags
final
String
tagsString
=
article
.
optString
(
Article
.
ARTICLE_TAGS_REF
);
String
tagsString
=
article
.
optString
(
Article
.
ARTICLE_TAGS_REF
);
tagsString
=
tagsString
.
replaceAll
(
","
,
","
);
article
.
put
(
Article
.
ARTICLE_TAGS_REF
,
tagsString
);
final
String
[]
tagTitles
=
tagsString
.
split
(
","
);
final
JSONArray
tags
=
tag
(
tagTitles
,
article
);
...
...
pom.xml
View file @
0bb225bd
...
...
@@ -29,7 +29,7 @@
<properties>
<servlet.version>
2.5
</servlet.version>
<slf4j.version>
1.7.5
</slf4j.version>
<org.b3log.latke.version>
1.
0.21
</org.b3log.latke.version>
<org.b3log.latke.version>
1.
1.0
</org.b3log.latke.version>
<maven-gae-plugin.version>
0.9.0
</maven-gae-plugin.version>
<gae.version>
1.8.1.1
</gae.version>
...
...
@@ -42,7 +42,7 @@
<maven-resources-plugin.version>
2.5
</maven-resources-plugin.version>
<maven-surefire-plugin.version>
2.9
</maven-surefire-plugin.version>
<maven-license-plugin.version>
1.9.0
</maven-license-plugin.version>
<maven-checkstyle-plugin.version>
2.
7
</maven-checkstyle-plugin.version>
<maven-checkstyle-plugin.version>
2.
15
</maven-checkstyle-plugin.version>
<maven-javancss-plugin.version>
2.0
</maven-javancss-plugin.version>
<maven-javadoc-plugin.version>
2.7
</maven-javadoc-plugin.version>
<coveralls-maven-plugin.version>
3.0.1
</coveralls-maven-plugin.version>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment