Commit d7a38706 authored by Liang Ding's avatar Liang Ding

Merge remote-tracking branch 'refs/remotes/origin/2.1.0-dev'

parents 0c3f2b69 1c4e9acd
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head> </head>
<body> <body>
<h2>Release 2.1.0 - May 25, 2017</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12284">12284 H2 SQL 文件导出</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
<li><a href="https://github.com/b3log/solo/issues/12280">12280 社区同步过来的评论加入头像</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12285">12285 移除 HTML 编辑器</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12273">12273 重新整理文档</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12278">12278 新的 Logo</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12274">12274 更新分类标签计数错误</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12295">12295 并发请求报错</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
</ul>
<h2>Release 2.0.0 - Apr 14, 2017</h2> <h2>Release 2.0.0 - Apr 14, 2017</h2>
<ul> <ul>
<li><a href="https://github.com/b3log/solo/issues/12256">12256 支持文章分类</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li> <li><a href="https://github.com/b3log/solo/issues/12256">12256 支持文章分类</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Description: Solo POM. Description: Solo POM.
Version: 3.16.1.37, May 13, 2017 Version: 3.16.1.38, May 25, 2017
Author: <a href="http://88250.b3log.org">Liang Ding</a> Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a> Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a> Author: <a href="http://vanessa.b3log.org">Vanessa</a>
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
<artifactId>solo</artifactId> <artifactId>solo</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>Solo</name> <name>Solo</name>
<version>2.0.0</version> <version>2.1.0</version>
<description> <description>
A blogging system written in Java, feel free to create your or your team own blog. 一个用 Java 实现的博客系统,为你或你的团队创建个博客吧 A blogging system written in Java, feel free to create your or your team own blog. 一个用 Java 实现的博客系统,为你或你的团队创建个博客吧
</description> </description>
<inceptionYear>2010</inceptionYear> <inceptionYear>2010</inceptionYear>
......
...@@ -63,7 +63,7 @@ import java.util.concurrent.locks.ReentrantLock; ...@@ -63,7 +63,7 @@ import java.util.concurrent.locks.ReentrantLock;
* Solo Servlet listener. * Solo Servlet listener.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.9.3.20, May 20, 2017 * @version 1.9.3.21, May 25, 2017
* @since 0.3.1 * @since 0.3.1
*/ */
public final class SoloServletListener extends AbstractServletListener { public final class SoloServletListener extends AbstractServletListener {
...@@ -71,7 +71,7 @@ public final class SoloServletListener extends AbstractServletListener { ...@@ -71,7 +71,7 @@ public final class SoloServletListener extends AbstractServletListener {
/** /**
* Solo version. * Solo version.
*/ */
public static final String VERSION = "2.0.0"; public static final String VERSION = "2.1.0";
/** /**
* JSONO print indent factor. * JSONO print indent factor.
......
...@@ -51,7 +51,7 @@ import java.sql.Statement; ...@@ -51,7 +51,7 @@ import java.sql.Statement;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="mailto:dongxu.wang@acm.org">Dongxu Wang</a> * @author <a href="mailto:dongxu.wang@acm.org">Dongxu Wang</a>
* @version 1.2.0.12, May 2, 2017 * @version 1.2.0.13, May 25, 2017
* @since 1.2.0 * @since 1.2.0
*/ */
@Service @Service
...@@ -75,7 +75,7 @@ public class UpgradeService { ...@@ -75,7 +75,7 @@ public class UpgradeService {
/** /**
* Old version. * Old version.
*/ */
private static final String FROM_VER = "1.9.0"; private static final String FROM_VER = "2.0.0";
/** /**
* New version. * New version.
...@@ -169,39 +169,15 @@ public class UpgradeService { ...@@ -169,39 +169,15 @@ public class UpgradeService {
Transaction transaction = null; Transaction transaction = null;
try { try {
final Connection connection = Connections.getConnection();
final Statement statement = connection.createStatement();
final String tablePrefix = Latkes.getLocalProperty("jdbc.tablePrefix") + "_";
statement.execute("CREATE TABLE `" + tablePrefix + "category` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `categoryTitle` varchar(64) NOT NULL,\n" +
" `categoryURI` varchar(32) NOT NULL,\n" +
" `categoryDescription` text NOT NULL,\n" +
" `categoryOrder` int(11) NOT NULL,\n" +
" `categoryTagCnt` int(11) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.execute("CREATE TABLE `" + tablePrefix + "category_tag` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `category_oId` varchar(19) NOT NULL,\n" +
" `tag_oId` varchar(19) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.close();
connection.commit();
connection.close();
transaction = optionRepository.beginTransaction(); transaction = optionRepository.beginTransaction();
final JSONObject versionOpt = optionRepository.get(Option.ID_C_VERSION); final JSONObject versionOpt = optionRepository.get(Option.ID_C_VERSION);
versionOpt.put(Option.OPTION_VALUE, TO_VER); versionOpt.put(Option.OPTION_VALUE, TO_VER);
optionRepository.update(Option.ID_C_VERSION, versionOpt); optionRepository.update(Option.ID_C_VERSION, versionOpt);
// https://github.com/b3log/solo/issues/12285 final JSONObject editorTypeOpt = optionRepository.get(Option.ID_C_EDITOR_TYPE);
// final JSONObject editorTypeOpt = optionRepository.get(Option.ID_C_EDITOR_TYPE); editorTypeOpt.put(Option.OPTION_VALUE, Option.DefaultPreference.DEFAULT_EDITOR_TYPE);
// editorTypeOpt.put(Option.OPTION_VALUE, Option.DefaultPreference.DEFAULT_EDITOR_TYPE); optionRepository.update(Option.ID_C_EDITOR_TYPE, editorTypeOpt);
// optionRepository.update(Option.ID_C_EDITOR_TYPE, editorTypeOpt);
transaction.commit(); transaction.commit();
...@@ -218,6 +194,36 @@ public class UpgradeService { ...@@ -218,6 +194,36 @@ public class UpgradeService {
LOGGER.log(Level.INFO, "Upgraded from version [{0}] to version [{1}] successfully :-)", FROM_VER, TO_VER); LOGGER.log(Level.INFO, "Upgraded from version [{0}] to version [{1}] successfully :-)", FROM_VER, TO_VER);
} }
/**
* Upgrade database tables.
*
* @throws Exception exception
*/
private void upgradeTables() throws Exception {
final Connection connection = Connections.getConnection();
final Statement statement = connection.createStatement();
final String tablePrefix = Latkes.getLocalProperty("jdbc.tablePrefix") + "_";
statement.execute("CREATE TABLE `" + tablePrefix + "category` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `categoryTitle` varchar(64) NOT NULL,\n" +
" `categoryURI` varchar(32) NOT NULL,\n" +
" `categoryDescription` text NOT NULL,\n" +
" `categoryOrder` int(11) NOT NULL,\n" +
" `categoryTagCnt` int(11) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.execute("CREATE TABLE `" + tablePrefix + "category_tag` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `category_oId` varchar(19) NOT NULL,\n" +
" `tag_oId` varchar(19) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.close();
connection.commit();
connection.close();
}
/** /**
* Upgrades users. * Upgrades users.
* <p> * <p>
......
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head> </head>
<body> <body>
<h2>Release 2.1.0 - May 25, 2017</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12284">12284 H2 SQL 文件导出</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
<li><a href="https://github.com/b3log/solo/issues/12280">12280 社区同步过来的评论加入头像</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12285">12285 移除 HTML 编辑器</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12273">12273 重新整理文档</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12278">12278 新的 Logo</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12274">12274 更新分类标签计数错误</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12295">12295 并发请求报错</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
</ul>
<h2>Release 2.0.0 - Apr 14, 2017</h2> <h2>Release 2.0.0 - Apr 14, 2017</h2>
<ul> <ul>
<li><a href="https://github.com/b3log/solo/issues/12256">12256 支持文章分类</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li> <li><a href="https://github.com/b3log/solo/issues/12256">12256 支持文章分类</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
......
...@@ -21,6 +21,4 @@ ...@@ -21,6 +21,4 @@
# #
name=9IPHP name=9IPHP
version=1.0.0
forSolo=2.0.0
memo=https://github.com/9IPHP memo=https://github.com/9IPHP
...@@ -21,6 +21,4 @@ ...@@ -21,6 +21,4 @@
# #
name=Mobile name=Mobile
version=0.1.5
forSolo=2.0.0
memo=\u8bf7\u4e0d\u8981\u4ece\u90e8\u7f72\u76ee\u5f55\u4e2d\u5220\u9664\u8be5\u76ae\u80a4\uff0c\u5426\u5219\u79fb\u52a8\u8bbe\u5907\u8bbf\u95ee\u65f6\u535a\u5ba2\u5c06\u4e0d\u53ef\u7528\u3002 memo=\u8bf7\u4e0d\u8981\u4ece\u90e8\u7f72\u76ee\u5f55\u4e2d\u5220\u9664\u8be5\u76ae\u80a4\uff0c\u5426\u5219\u79fb\u52a8\u8bbe\u5907\u8bbf\u95ee\u65f6\u535a\u5ba2\u5c06\u4e0d\u53ef\u7528\u3002
...@@ -28,7 +28,7 @@ import org.testng.annotations.Test; ...@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
* {@link UserMgmtService} test case. * {@link UserMgmtService} test case.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.2, May 16, 2013 * @version 1.0.0.3, May 25, 2017
*/ */
@Test(suiteName = "service") @Test(suiteName = "service")
public class UserMgmtServiceTestCase extends AbstractTestCase { public class UserMgmtServiceTestCase extends AbstractTestCase {
...@@ -44,7 +44,7 @@ public class UserMgmtServiceTestCase extends AbstractTestCase { ...@@ -44,7 +44,7 @@ public class UserMgmtServiceTestCase extends AbstractTestCase {
final JSONObject requestJSONObject = new JSONObject(); final JSONObject requestJSONObject = new JSONObject();
requestJSONObject.put(User.USER_NAME, "user1 name"); requestJSONObject.put(User.USER_NAME, "user1name");
requestJSONObject.put(User.USER_EMAIL, "test1@gmail.com"); requestJSONObject.put(User.USER_EMAIL, "test1@gmail.com");
requestJSONObject.put(User.USER_PASSWORD, "pass1"); requestJSONObject.put(User.USER_PASSWORD, "pass1");
...@@ -63,7 +63,7 @@ public class UserMgmtServiceTestCase extends AbstractTestCase { ...@@ -63,7 +63,7 @@ public class UserMgmtServiceTestCase extends AbstractTestCase {
JSONObject requestJSONObject = new JSONObject(); JSONObject requestJSONObject = new JSONObject();
requestJSONObject.put(User.USER_NAME, "user2 name"); requestJSONObject.put(User.USER_NAME, "user2name");
requestJSONObject.put(User.USER_EMAIL, "test2@gmail.com"); requestJSONObject.put(User.USER_EMAIL, "test2@gmail.com");
requestJSONObject.put(User.USER_PASSWORD, "pass2"); requestJSONObject.put(User.USER_PASSWORD, "pass2");
requestJSONObject.put(User.USER_ROLE, Role.ADMIN_ROLE); requestJSONObject.put(User.USER_ROLE, Role.ADMIN_ROLE);
...@@ -72,16 +72,16 @@ public class UserMgmtServiceTestCase extends AbstractTestCase { ...@@ -72,16 +72,16 @@ public class UserMgmtServiceTestCase extends AbstractTestCase {
Assert.assertNotNull(id); Assert.assertNotNull(id);
requestJSONObject.put(Keys.OBJECT_ID, id); requestJSONObject.put(Keys.OBJECT_ID, id);
requestJSONObject.put(User.USER_NAME, "user2 new name"); requestJSONObject.put(User.USER_NAME, "user2newname");
userMgmtService.updateUser(requestJSONObject); userMgmtService.updateUser(requestJSONObject);
Assert.assertEquals(getUserQueryService().getUser(id).getJSONObject( Assert.assertEquals(getUserQueryService().getUser(id).getJSONObject(
User.USER).getString(User.USER_NAME), "user2 new name"); User.USER).getString(User.USER_NAME), "user2newname");
// Do not update password // Do not update password
requestJSONObject.put(Keys.OBJECT_ID, id); requestJSONObject.put(Keys.OBJECT_ID, id);
requestJSONObject.put(User.USER_NAME, "user2 name"); requestJSONObject.put(User.USER_NAME, "user2name");
requestJSONObject.put(User.USER_EMAIL, "test2@gmail.com"); requestJSONObject.put(User.USER_EMAIL, "test2@gmail.com");
requestJSONObject.put(User.USER_PASSWORD, "pass2"); requestJSONObject.put(User.USER_PASSWORD, "pass2");
......
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