Commit aca48c32 authored by Liang Ding's avatar Liang Ding

Merge pull request #156 from ArmstrongCN/master

偏好设置->博客地址为空时社区同步链接出错
parents c53b3170 81e72b50
......@@ -94,7 +94,11 @@ public final class ArticleSender extends AbstractEventListener<JSONObject> {
throw new EventException("Not found preference");
}
final String blogHost = preference.getString(Preference.BLOG_HOST).toLowerCase();
/*
* Use configured host if Preference.BLOG_HOST is empty.
*/
final String perferHost = preference.getString(Preference.BLOG_HOST);
final String blogHost = perferHost!=null&&!"".equals(perferHost)?perferHost.toLowerCase():Latkes.getServePath();
if (blogHost.contains("localhost")) {
LOGGER.log(Level.INFO, "Blog Solo runs on local server, so should not send this article[id={0}, title={1}] to Rhythm",
new Object[]{originalArticle.getString(Keys.OBJECT_ID), originalArticle.getString(Article.ARTICLE_TITLE)});
......
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