Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
9be8840e
Commit
9be8840e
authored
Feb 04, 2013
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
056 升级程序
用户密码哈希;插件表加 setting 字段
parent
0671cd28
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
54 additions
and
33 deletions
+54
-33
core/pom.xml
core/pom.xml
+2
-2
core/src/main/java/org/b3log/solo/SoloServletListener.java
core/src/main/java/org/b3log/solo/SoloServletListener.java
+2
-2
core/src/main/java/org/b3log/solo/processor/UpgradeProcessor.java
.../main/java/org/b3log/solo/processor/UpgradeProcessor.java
+33
-12
core/src/test/resources/skins/ease/skin.properties
core/src/test/resources/skins/ease/skin.properties
+2
-2
pom.xml
pom.xml
+2
-2
war/bae/pom.xml
war/bae/pom.xml
+1
-1
war/gae/pom.xml
war/gae/pom.xml
+1
-1
war/h2/pom.xml
war/h2/pom.xml
+1
-1
war/mysql/pom.xml
war/mysql/pom.xml
+1
-1
war/pom.xml
war/pom.xml
+1
-1
war/src/main/webapp/WEB-INF/appengine-web.xml
war/src/main/webapp/WEB-INF/appengine-web.xml
+2
-2
war/src/main/webapp/skins/ease/skin.properties
war/src/main/webapp/skins/ease/skin.properties
+3
-3
war/src/main/webapp/skins/mobile/skin.properties
war/src/main/webapp/skins/mobile/skin.properties
+3
-3
No files found.
core/pom.xml
View file @
9be8840e
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: B3log Solo core.
Version: 2.0.1.
1, Nov 21, 2012
Version: 2.0.1.
2, Feb 4, 2013
Author: Liang Ding
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
...
...
@@ -17,7 +17,7 @@
<parent>
<groupId>
org.b3log
</groupId>
<artifactId>
solo
</artifactId>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
</parent>
<dependencies>
...
...
core/src/main/java/org/b3log/solo/SoloServletListener.java
View file @
9be8840e
...
...
@@ -55,7 +55,7 @@ import org.json.JSONObject;
* B3log Solo servlet listener.
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.7.
6, Nov 21, 2012
* @version 1.0.7.
7, Feb 4, 2013
* @since 0.3.1
*/
public
final
class
SoloServletListener
extends
AbstractServletListener
{
...
...
@@ -63,7 +63,7 @@ public final class SoloServletListener extends AbstractServletListener {
/**
* B3log Solo version.
*/
public
static
final
String
VERSION
=
"0.5.
5
"
;
public
static
final
String
VERSION
=
"0.5.
6
"
;
/**
* Logger.
...
...
core/src/main/java/org/b3log/solo/processor/UpgradeProcessor.java
View file @
9be8840e
...
...
@@ -17,13 +17,19 @@ package org.b3log.solo.processor;
import
java.io.IOException
;
import
java.sql.Connection
;
import
java.sql.Statement
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
org.b3log.latke.Keys
;
import
org.b3log.latke.Latkes
;
import
org.b3log.latke.RuntimeEnv
;
import
org.b3log.latke.mail.MailService
;
import
org.b3log.latke.mail.MailServiceFactory
;
import
org.b3log.latke.model.Plugin
;
import
org.b3log.latke.model.User
;
import
org.b3log.latke.repository.*
;
import
org.b3log.latke.repository.jdbc.util.Connections
;
import
org.b3log.latke.service.LangPropsService
;
import
org.b3log.latke.service.ServiceException
;
import
org.b3log.latke.servlet.HTTPRequestContext
;
...
...
@@ -47,7 +53,7 @@ import org.json.JSONObject;
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @author <a href="mailto:dongxv.vang@gmail.com">Dongxu Wang</a>
* @version 1.1.1.
5, Jan
4, 2013
* @version 1.1.1.
6, Feb
4, 2013
* @since 0.3.1
*/
@RequestProcessor
...
...
@@ -132,8 +138,8 @@ public final class UpgradeProcessor {
return
;
}
if
(
"0.5.
0
"
.
equals
(
version
))
{
v05
0ToV055
();
if
(
"0.5.
5
"
.
equals
(
version
))
{
v05
5ToV056
();
}
else
{
LOGGER
.
log
(
Level
.
WARNING
,
"Attempt to skip more than one version to upgrade. Expected: 0.5.0; Actually: {0}"
,
version
);
if
(!
sent
)
{
...
...
@@ -146,17 +152,18 @@ public final class UpgradeProcessor {
LOGGER
.
log
(
Level
.
SEVERE
,
e
.
getMessage
(),
e
);
renderer
.
setContent
(
"Upgrade failed ["
+
e
.
getMessage
()
+
"], please contact the B3log Solo developers or reports this "
+
"issue directly (https://github.com/b3log/b3log-solo/issues/new) "
);
+
"issue directly (<a href='https://github.com/b3log/b3log-solo/issues/new'>"
+
"https://github.com/b3log/b3log-solo/issues/new</a>) "
);
}
}
/**
* Upgrades from version 05
0 to version 055
.
* Upgrades from version 05
5 to version 056
.
*
* @throws Exception upgrade fails
*/
private
void
v05
0ToV055
()
throws
Exception
{
LOGGER
.
info
(
"Upgrading from version 05
0 to version 055
...."
);
private
void
v05
5ToV056
()
throws
Exception
{
LOGGER
.
info
(
"Upgrading from version 05
5 to version 056
...."
);
articleRepository
.
setCacheEnabled
(
false
);
...
...
@@ -168,10 +175,24 @@ public final class UpgradeProcessor {
// Upgrades preference model
final
JSONObject
preference
=
preferenceRepository
.
get
(
Preference
.
PREFERENCE
);
preference
.
put
(
Preference
.
VERSION
,
"0.5.5"
);
preference
.
put
(
Preference
.
VERSION
,
"0.5.6"
);
preferenceRepository
.
update
(
Preference
.
PREFERENCE
,
preference
);
upgradeUsers
();
final
RuntimeEnv
runtimeEnv
=
Latkes
.
getRuntimeEnv
();
if
(
RuntimeEnv
.
LOCAL
==
runtimeEnv
||
RuntimeEnv
.
BAE
==
runtimeEnv
)
{
final
Connection
connection
=
Connections
.
getConnection
();
final
Statement
statement
=
connection
.
createStatement
();
final
String
tableName
=
Latkes
.
getLocalProperty
(
"jdbc.tablePrefix"
)
+
'_'
+
Plugin
.
PLUGIN
;
statement
.
execute
(
"ALTER TABLE "
+
tableName
+
" ADD setting text"
);
connection
.
commit
();
}
transaction
.
commit
();
LOGGER
.
log
(
Level
.
FINEST
,
"Updated preference"
);
...
...
@@ -181,12 +202,12 @@ public final class UpgradeProcessor {
}
LOGGER
.
log
(
Level
.
SEVERE
,
"Upgrade failed."
,
e
);
throw
new
Exception
(
"Upgrade failed from version 05
0 to version 055
"
);
throw
new
Exception
(
"Upgrade failed from version 05
5 to version 056
"
);
}
finally
{
articleRepository
.
setCacheEnabled
(
true
);
}
LOGGER
.
info
(
"Upgraded from version 05
0 to version 055
successfully :-)"
);
LOGGER
.
info
(
"Upgraded from version 05
5 to version 056
successfully :-)"
);
}
/**
...
...
core/src/test/resources/skins/ease/skin.properties
View file @
9be8840e
...
...
@@ -16,11 +16,11 @@
#
# Description: ease skin (mock for test).
# Version: 1.0.0.
2, Nov 21, 2012
# Version: 1.0.0.
3, Feb 4, 2013
# Author: Liang Ding
#
name
=
ease
version
=
1.0.3
forSolo
=
0.5.
5
forSolo
=
0.5.
6
memo
=
\u
56de
\u
5f52
\u
606c
\u9759
pom.xml
View file @
9be8840e
...
...
@@ -11,7 +11,7 @@
<groupId>
org.b3log
</groupId>
<artifactId>
solo
</artifactId>
<packaging>
pom
</packaging>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
<name>
B3log Solo
</name>
<url>
https://github.com/b3log/b3log-solo
</url>
<description>
...
...
@@ -28,7 +28,7 @@
<!-- Properties -->
<properties>
<servlet.version>
2.5
</servlet.version>
<org.b3log.solo.version>
0.5.
5
</org.b3log.solo.version>
<org.b3log.solo.version>
0.5.
6
</org.b3log.solo.version>
<org.b3log.latke.version>
0.5.0-SNAPSHOT
</org.b3log.latke.version>
<org.b3log.latke-gae.version>
0.5.0-SNAPSHOT
</org.b3log.latke-gae.version>
<org.b3log.latke-bae.version>
0.5.0-SNAPSHOT
</org.b3log.latke-bae.version>
...
...
war/bae/pom.xml
View file @
9be8840e
...
...
@@ -19,7 +19,7 @@
<parent>
<groupId>
org.b3log
</groupId>
<artifactId>
solo-war
</artifactId>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
</parent>
<properties>
...
...
war/gae/pom.xml
View file @
9be8840e
...
...
@@ -19,7 +19,7 @@
<parent>
<groupId>
org.b3log
</groupId>
<artifactId>
solo-war
</artifactId>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
</parent>
<properties>
...
...
war/h2/pom.xml
View file @
9be8840e
...
...
@@ -19,7 +19,7 @@
<parent>
<groupId>
org.b3log
</groupId>
<artifactId>
solo-war
</artifactId>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
</parent>
<properties>
...
...
war/mysql/pom.xml
View file @
9be8840e
...
...
@@ -19,7 +19,7 @@
<parent>
<groupId>
org.b3log
</groupId>
<artifactId>
solo-war
</artifactId>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
</parent>
<properties>
...
...
war/pom.xml
View file @
9be8840e
...
...
@@ -19,7 +19,7 @@
<parent>
<groupId>
org.b3log
</groupId>
<artifactId>
solo
</artifactId>
<version>
0.5.
5
</version>
<version>
0.5.
6
</version>
</parent>
<modules>
...
...
war/src/main/webapp/WEB-INF/appengine-web.xml
View file @
9be8840e
...
...
@@ -20,12 +20,12 @@
Description: Web deployment descriptor on GAE. See
http://code.google.com/intl/en/appengine/docs/java/config/appconfig.html
for more details.
Version: 1.0.3.1
0, Nov 21, 2012
Version: 1.0.3.1
1, Feb 4, 2013
Author: Liang Ding
-->
<appengine-web-app
xmlns=
"http://appengine.google.com/ns/1.0"
>
<application>
solo-demo
</application>
<version>
05
5
</version>
<version>
05
6
</version>
<sessions-enabled>
true
</sessions-enabled>
...
...
war/src/main/webapp/skins/ease/skin.properties
View file @
9be8840e
...
...
@@ -16,12 +16,12 @@
#
# Description: ease skin.
# Version: 1.0.0.
3, Nov 21, 2012
# Version: 1.0.0.
4, Feb 4, 2013
# Author: Liyuan Li
# Author: Liang Ding
#
name
=
ease
version
=
1.0.
3
forSolo
=
0.5.
5
version
=
1.0.
4
forSolo
=
0.5.
6
memo
=
\u
56de
\u
5f52
\u
606c
\u9759
war/src/main/webapp/skins/mobile/skin.properties
View file @
9be8840e
...
...
@@ -16,11 +16,11 @@
#
# Description: Mobile skin.
# Version: 1.0.0.
5, Nov 21, 2012
# Version: 1.0.0.
6, Feb 4, 2013
# Author: Liang Ding
#
name
=
Mobile
version
=
0.1.
4
forSolo
=
0.5.
5
version
=
0.1.
5
forSolo
=
0.5.
6
memo
=
\u
8bf7
\u
4e0d
\u8981\u
4ece
\u
90e8
\u
7f72
\u
76ee
\u
5f55
\u
4e2d
\u5220\u9664\u
8be5
\u
76ae
\u
80a4
\u
ff0c
\u5426\u5219\u
79fb
\u
52a8
\u
8bbe
\u5907\u
8bbf
\u
95ee
\u
65f6
\u
535a
\u
5ba2
\u
5c06
\u
4e0d
\u
53ef
\u7528\u3002
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment