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
8b63b920
Commit
8b63b920
authored
Nov 20, 2017
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
修复从社区同步更新文章时丢失签名档的缺陷
parent
661787f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
src/main/java/org/b3log/solo/api/symphony/ArticleReceiver.java
...ain/java/org/b3log/solo/api/symphony/ArticleReceiver.java
+4
-11
No files found.
src/main/java/org/b3log/solo/api/symphony/ArticleReceiver.java
View file @
8b63b920
...
@@ -44,7 +44,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -44,7 +44,7 @@ import javax.servlet.http.HttpServletResponse;
* Article receiver (from B3log Symphony).
* Article receiver (from B3log Symphony).
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.
3.8, Jan 25
, 2017
* @version 1.0.
4.0, Nov 20
, 2017
* @since 0.5.5
* @since 0.5.5
*/
*/
@RequestProcessor
@RequestProcessor
...
@@ -109,9 +109,7 @@ public class ArticleReceiver {
...
@@ -109,9 +109,7 @@ public class ArticleReceiver {
public
void
addArticle
(
final
HttpServletRequest
request
,
final
HttpServletResponse
response
,
final
HTTPRequestContext
context
)
public
void
addArticle
(
final
HttpServletRequest
request
,
final
HttpServletResponse
response
,
final
HTTPRequestContext
context
)
throws
Exception
{
throws
Exception
{
final
JSONRenderer
renderer
=
new
JSONRenderer
();
final
JSONRenderer
renderer
=
new
JSONRenderer
();
context
.
setRenderer
(
renderer
);
context
.
setRenderer
(
renderer
);
final
JSONObject
ret
=
new
JSONObject
();
final
JSONObject
ret
=
new
JSONObject
();
try
{
try
{
...
@@ -136,11 +134,8 @@ public class ArticleReceiver {
...
@@ -136,11 +134,8 @@ public class ArticleReceiver {
article
.
put
(
Common
.
POST_TO_COMMUNITY
,
false
);
// Do not send to rhythm
article
.
put
(
Common
.
POST_TO_COMMUNITY
,
false
);
// Do not send to rhythm
article
.
put
(
Article
.
ARTICLE_COMMENTABLE
,
true
);
article
.
put
(
Article
.
ARTICLE_COMMENTABLE
,
true
);
article
.
put
(
Article
.
ARTICLE_VIEW_PWD
,
""
);
article
.
put
(
Article
.
ARTICLE_VIEW_PWD
,
""
);
String
content
=
article
.
getString
(
Article
.
ARTICLE_CONTENT
);
final
String
content
=
article
.
getString
(
Article
.
ARTICLE_CONTENT
);
final
String
articleId
=
article
.
getString
(
Keys
.
OBJECT_ID
);
final
String
articleId
=
article
.
getString
(
Keys
.
OBJECT_ID
);
// content += "\n\n<p style='font-size: 12px;'><i>该文章同步自 <a href='https://hacpai.com/article/" + articleId
// + "' target='_blank'>黑客派</a></i></p>";
article
.
put
(
Article
.
ARTICLE_CONTENT
,
content
);
article
.
put
(
Article
.
ARTICLE_CONTENT
,
content
);
articleMgmtService
.
addArticle
(
requestJSONObject
);
articleMgmtService
.
addArticle
(
requestJSONObject
);
...
@@ -224,11 +219,9 @@ public class ArticleReceiver {
...
@@ -224,11 +219,9 @@ public class ArticleReceiver {
article
.
put
(
Common
.
POST_TO_COMMUNITY
,
false
);
// Do not send to rhythm
article
.
put
(
Common
.
POST_TO_COMMUNITY
,
false
);
// Do not send to rhythm
article
.
put
(
Article
.
ARTICLE_COMMENTABLE
,
true
);
article
.
put
(
Article
.
ARTICLE_COMMENTABLE
,
true
);
article
.
put
(
Article
.
ARTICLE_VIEW_PWD
,
""
);
article
.
put
(
Article
.
ARTICLE_VIEW_PWD
,
""
);
String
content
=
article
.
getString
(
Article
.
ARTICLE_CONTENT
);
final
String
content
=
article
.
getString
(
Article
.
ARTICLE_CONTENT
);
// content += "\n\n<p style='font-size: 12px;'><i>该文章同步自 <a href='https://hacpai.com/article/" + articleId
// + "' target='_blank'>黑客派</a></i></p>";
article
.
put
(
Article
.
ARTICLE_CONTENT
,
content
);
article
.
put
(
Article
.
ARTICLE_CONTENT
,
content
);
article
.
put
(
Article
.
ARTICLE_SIGN_ID
,
"1"
);
articleMgmtService
.
updateArticle
(
requestJSONObject
);
articleMgmtService
.
updateArticle
(
requestJSONObject
);
...
...
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