Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
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-1
Commits
6db070a1
Unverified
Commit
6db070a1
authored
Sep 01, 2018
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔊
#12495
parent
840196c9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
src/main/java/org/b3log/solo/service/PreferenceMgmtService.java
...in/java/org/b3log/solo/service/PreferenceMgmtService.java
+6
-9
src/main/java/org/b3log/solo/util/Skins.java
src/main/java/org/b3log/solo/util/Skins.java
+2
-3
No files found.
src/main/java/org/b3log/solo/service/PreferenceMgmtService.java
View file @
6db070a1
...
...
@@ -51,7 +51,7 @@ import static org.b3log.solo.util.Skins.setDirectoryForTemplateLoading;
* Preference management service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.2.1
3, Jul 22, 2017
* @version 1.3.2.1
4, Sep 1, 2018
* @since 0.4.0
*/
@Service
...
...
@@ -108,9 +108,8 @@ public class PreferenceMgmtService {
for
(
final
String
dirName
:
skinDirNames
)
{
final
JSONObject
skin
=
new
JSONObject
();
final
String
name
=
Latkes
.
getSkinName
(
dirName
);
if
(
null
==
name
)
{
LOGGER
.
log
(
Level
.
WARN
,
"The directory[{0}] does not contain any skin, ignored it"
,
dirName
);
LOGGER
.
log
(
Level
.
WARN
,
"The directory
[{0}] does not contain any skin, ignored it"
,
dirName
);
continue
;
}
...
...
@@ -127,14 +126,12 @@ public class PreferenceMgmtService {
LOGGER
.
log
(
Level
.
DEBUG
,
"Current skin[name={0}]"
,
skinName
);
if
(!
skinDirNames
.
contains
(
currentSkinDirName
))
{
LOGGER
.
log
(
Level
.
WARN
,
"Config
red skin[dirName={0}] can not find, try to use "
+
"default skin
[dirName="
LOGGER
.
log
(
Level
.
WARN
,
"Config
ured skin [dirName={0}] can not find, try to use "
+
"default skin
[dirName="
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"] instead."
,
currentSkinDirName
);
if
(!
skinDirNames
.
contains
(
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
))
{
LOGGER
.
log
(
Level
.
ERROR
,
"Can not find skin[dirName="
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"]"
);
throw
new
IllegalStateException
(
"Can not find default skin[dirName="
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"], please redeploy your Solo and make sure contains this default skin!"
);
LOGGER
.
log
(
Level
.
ERROR
,
"Can not find default skin [dirName="
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"], please redeploy your Solo and make sure contains the default skin. If you are using git, try to re-pull with 'git pull --recurse-submodules'"
);
System
.
exit
(-
1
);
}
preference
.
put
(
SKIN_DIR_NAME
,
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
);
...
...
src/main/java/org/b3log/solo/util/Skins.java
View file @
6db070a1
...
...
@@ -46,7 +46,7 @@ import java.util.*;
* Skin utilities.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.5.
9, Jul 3
1, 2018
* @version 1.1.5.
10, Sep
1, 2018
* @since 0.3.1
*/
public
final
class
Skins
{
...
...
@@ -164,8 +164,7 @@ public final class Skins {
for
(
final
String
path
:
resourcePaths
)
{
final
String
dirName
=
path
.
substring
(
"/skins"
.
length
()
+
1
,
path
.
length
()
-
1
);
if
(
dirName
.
startsWith
(
"."
))
{
if
(
dirName
.
contains
(
"."
))
{
continue
;
}
...
...
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