Commit ef7c7812 authored by Liang Ding's avatar Liang Ding

Merge branch '2.2.0-dev'

parents 180686b9 069d11a6
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: Solo POM.
Version: 3.17.1.41, Jun 27, 2017
Version: 3.17.1.42, Jul 8, 2017
Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a>
......@@ -74,7 +74,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.b3log.latke.version>2.3.12</org.b3log.latke.version>
<org.b3log.latke.version>2.3.13</org.b3log.latke.version>
<servlet.version>3.1.0</servlet.version>
<slf4j.version>1.7.5</slf4j.version>
......
......@@ -138,7 +138,7 @@ public final class Starter {
Latkes.setStaticServerPort(staticServerPort);
String runtimeMode = commandLine.getOptionValue("runtime_mode");
if (null != runtimeMode) {
Latkes.setRuntimeMode(RuntimeMode.valueOf(runtimeMode));
Latkes.setRuntimeMode(Latkes.RuntimeMode.valueOf(runtimeMode));
}
Latkes.setScanPath("org.b3log.solo"); // For Latke IoC
......
......@@ -77,7 +77,7 @@ public class ArticleGenerator {
@RequestProcessing(value = "/dev/articles/gen/*", method = HTTPRequestMethod.GET)
public void genArticles(final HTTPRequestContext context, final HttpServletRequest request, final HttpServletResponse response)
throws IOException {
if (RuntimeMode.DEVELOPMENT != Latkes.getRuntimeMode()) {
if (Latkes.RuntimeMode.DEVELOPMENT != Latkes.getRuntimeMode()) {
LOGGER.log(Level.WARN, "Article generation just for development mode, " + "current runtime mode is [{0}]",
Latkes.getRuntimeMode());
response.sendRedirect(Latkes.getServePath());
......
......@@ -233,8 +233,8 @@ public class AdminConsole {
final Map<String, String> langs = langPropsService.getAll(locale);
final Map<String, Object> dataModel = renderer.getDataModel();
dataModel.put("supportExport", RuntimeDatabase.MYSQL == Latkes.getRuntimeDatabase()
|| RuntimeDatabase.H2 == Latkes.getRuntimeDatabase());
dataModel.put("supportExport", Latkes.RuntimeDatabase.MYSQL == Latkes.getRuntimeDatabase()
|| Latkes.RuntimeDatabase.H2 == Latkes.getRuntimeDatabase());
dataModel.putAll(langs);
Keys.fillRuntime(dataModel);
dataModel.put(Option.ID_C_LOCALE_STRING, locale.toString());
......@@ -310,9 +310,8 @@ public class AdminConsole {
return;
}
final RuntimeDatabase runtimeDatabase = Latkes.getRuntimeDatabase();
if (RuntimeDatabase.H2 != runtimeDatabase && RuntimeDatabase.MYSQL != runtimeDatabase) {
final Latkes.RuntimeDatabase runtimeDatabase = Latkes.getRuntimeDatabase();
if (Latkes.RuntimeDatabase.H2 != runtimeDatabase && Latkes.RuntimeDatabase.MYSQL != runtimeDatabase) {
context.renderJSON().renderMsg("Just support MySQL/H2 export now");
return;
......@@ -323,7 +322,7 @@ public class AdminConsole {
final String dbURL = Latkes.getLocalProperty("jdbc.URL");
String sql; // exported SQL script
if (RuntimeDatabase.MYSQL == runtimeDatabase) {
if (Latkes.RuntimeDatabase.MYSQL == runtimeDatabase) {
String db = StringUtils.substringAfterLast(dbURL, "/");
db = StringUtils.substringBefore(db, "?");
......@@ -339,7 +338,7 @@ public class AdminConsole {
return;
}
} else if (RuntimeDatabase.H2 == runtimeDatabase) {
} else if (Latkes.RuntimeDatabase.H2 == runtimeDatabase) {
final Connection connection = Connections.getConnection();
final Statement statement = connection.createStatement();
......
......@@ -204,7 +204,7 @@ public class InitService {
LOGGER.log(Level.INFO, "Solo is running with database [{0}], creates all tables", Latkes.getRuntimeDatabase());
if (RuntimeDatabase.H2 == Latkes.getRuntimeDatabase()) {
if (Latkes.RuntimeDatabase.H2 == Latkes.getRuntimeDatabase()) {
String dataDir = Latkes.getLocalProperty("jdbc.URL");
dataDir = dataDir.replace("~", System.getProperty("user.home"));
LOGGER.log(Level.INFO, "YOUR DATA will be stored in directory [" + dataDir + "], "
......
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