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;
* Article console request processing.
*
* @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
*/
@Singleton
......@@ -500,7 +500,7 @@ public class ArticleConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
......@@ -558,7 +558,7 @@ public class ArticleConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
}
......@@ -51,7 +51,7 @@ import java.util.Set;
* Category console request processing.
*
* @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
*/
@RequestProcessor
......@@ -347,7 +347,7 @@ public class CategoryConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
......@@ -476,7 +476,7 @@ public class CategoryConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
......
......@@ -42,7 +42,7 @@ import org.json.JSONObject;
* Plugin console request processing.
*
* @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
*/
@RequestProcessor
......@@ -128,7 +128,7 @@ public class PageConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
......@@ -216,7 +216,7 @@ public class PageConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
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;
*
* @author <a href="http://88250.b3log.org">Liang Ding</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
*/
@RequestProcessor
......@@ -284,7 +284,7 @@ public class PreferenceConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
......
......@@ -41,7 +41,7 @@ import org.json.JSONObject;
*
* @author <a href="http://88250.b3log.org">Liang Ding</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
*/
@RequestProcessor
......@@ -116,7 +116,7 @@ public class UserConsole {
final JSONObject jsonObject = new JSONObject().put(Keys.STATUS_CODE, false);
renderer.setJSONObject(jsonObject);
jsonObject.put(Keys.MSG, e.getMessage());
jsonObject.put(Keys.MSG, langPropsService.get("updateFailLabel"));
}
}
......
......@@ -49,7 +49,7 @@ import java.util.Date;
* Comment management service.
*
* @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
*/
@Service
......@@ -208,10 +208,7 @@ public class CommentMgmtService {
final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL);
if (!Strings.isURL(commentURL) || StringUtils.contains(commentURL, "<")) {
LOGGER.log(Level.WARN, "Comment URL is invalid [{0}]", commentURL);
ret.put(Keys.MSG, langPropsService.get("urlInvalidLabel"));
return ret;
requestJSONObject.put(Comment.COMMENT_URL, "");
}
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