Commit 61ac33fa authored by Liang Ding's avatar Liang Ding

Merge branch 'master' into 3.5.0-dev

parents e850273f 97eaf2d8
...@@ -49,7 +49,7 @@ import java.util.stream.Collectors; ...@@ -49,7 +49,7 @@ import java.util.stream.Collectors;
* Article console request processing. * Article console request processing.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.0.0, Feb 10, 2019 * @version 1.2.0.1, Mar 29, 2019
* @since 0.4.0 * @since 0.4.0
*/ */
@Singleton @Singleton
...@@ -500,7 +500,7 @@ public class ArticleConsole { ...@@ -500,7 +500,7 @@ public class ArticleConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
...@@ -558,7 +558,7 @@ public class ArticleConsole { ...@@ -558,7 +558,7 @@ public class ArticleConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
} }
...@@ -51,7 +51,7 @@ import java.util.Set; ...@@ -51,7 +51,7 @@ import java.util.Set;
* Category console request processing. * Category console request processing.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.3.3, Dec 10, 2018 * @version 1.1.3.4, Mar 29, 2019
* @since 2.0.0 * @since 2.0.0
*/ */
@RequestProcessor @RequestProcessor
...@@ -347,7 +347,7 @@ public class CategoryConsole { ...@@ -347,7 +347,7 @@ public class CategoryConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
...@@ -476,7 +476,7 @@ public class CategoryConsole { ...@@ -476,7 +476,7 @@ public class CategoryConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
......
...@@ -42,7 +42,7 @@ import org.json.JSONObject; ...@@ -42,7 +42,7 @@ import org.json.JSONObject;
* Plugin console request processing. * Plugin console request processing.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.9, Dec 11, 2018 * @version 1.0.0.10, Mar 29, 2019
* @since 0.4.0 * @since 0.4.0
*/ */
@RequestProcessor @RequestProcessor
...@@ -128,7 +128,7 @@ public class PageConsole { ...@@ -128,7 +128,7 @@ public class PageConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
...@@ -216,7 +216,7 @@ public class PageConsole { ...@@ -216,7 +216,7 @@ public class PageConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
......
...@@ -44,7 +44,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -44,7 +44,7 @@ import javax.servlet.http.HttpServletResponse;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://github.com/hzchendou">hzchendou</a> * @author <a href="https://github.com/hzchendou">hzchendou</a>
* @version 1.2.0.23, Mar 19, 2019 * @version 1.2.0.24, Mar 29, 2019
* @since 0.4.0 * @since 0.4.0
*/ */
@RequestProcessor @RequestProcessor
...@@ -284,7 +284,7 @@ public class PreferenceConsole { ...@@ -284,7 +284,7 @@ public class PreferenceConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
......
...@@ -41,7 +41,7 @@ import org.json.JSONObject; ...@@ -41,7 +41,7 @@ import org.json.JSONObject;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://hacpai.com/member/DASHU">DASHU</a> * @author <a href="https://hacpai.com/member/DASHU">DASHU</a>
* @version 1.2.1.6, Feb 8, 2019 * @version 1.2.1.7, Mar 29, 2019
* @since 0.4.0 * @since 0.4.0
*/ */
@RequestProcessor @RequestProcessor
...@@ -116,7 +116,7 @@ public class UserConsole { ...@@ -116,7 +116,7 @@ public class UserConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false); final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject); renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage()); jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
} }
} }
......
...@@ -49,7 +49,7 @@ import java.util.Date; ...@@ -49,7 +49,7 @@ import java.util.Date;
* Comment management service. * Comment management service.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.4.0, Mar 22, 2019 * @version 1.3.4.1, Mar 29, 2019
* @since 0.3.5 * @since 0.3.5
*/ */
@Service @Service
...@@ -208,10 +208,7 @@ public class CommentMgmtService { ...@@ -208,10 +208,7 @@ public class CommentMgmtService {
final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL); final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL);
if (!Strings.isURL(commentURL) || StringUtils.contains(commentURL, "<")) { if (!Strings.isURL(commentURL) || StringUtils.contains(commentURL, "<")) {
LOGGER.log(Level.WARN, "Comment URL is invalid [{0}]", commentURL); requestJSONObject.put(Comment.COMMENT_URL, "");
ret.put(Keys.MSG, langPropsService.get("urlInvalidLabel"));
return ret;
} }
String commentContent = requestJSONObject.optString(Comment.COMMENT_CONTENT); String commentContent = requestJSONObject.optString(Comment.COMMENT_CONTENT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment