Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
eac12121
Commit
eac12121
authored
Aug 31, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: always prefix lang for non-default language in disk storage module (#1000)
parent
7a582f71
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
storage.js
server/modules/storage/disk/storage.js
+5
-5
No files found.
server/modules/storage/disk/storage.js
View file @
eac12121
...
...
@@ -59,7 +59,7 @@ module.exports = {
async
created
(
page
)
{
WIKI
.
logger
.
info
(
`(STORAGE/DISK) Creating file
${
page
.
path
}
...`
)
let
fileName
=
`
${
page
.
path
}
.
${
getFileExtension
(
page
.
contentType
)}
`
if
(
WIKI
.
config
.
lang
.
namespacing
&&
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
if
(
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
fileName
=
`
${
page
.
localeCode
}
/
${
fileName
}
`
}
const
filePath
=
path
.
join
(
this
.
config
.
path
,
fileName
)
...
...
@@ -68,7 +68,7 @@ module.exports = {
async
updated
(
page
)
{
WIKI
.
logger
.
info
(
`(STORAGE/DISK) Updating file
${
page
.
path
}
...`
)
let
fileName
=
`
${
page
.
path
}
.
${
getFileExtension
(
page
.
contentType
)}
`
if
(
WIKI
.
config
.
lang
.
namespacing
&&
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
if
(
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
fileName
=
`
${
page
.
localeCode
}
/
${
fileName
}
`
}
const
filePath
=
path
.
join
(
this
.
config
.
path
,
fileName
)
...
...
@@ -77,7 +77,7 @@ module.exports = {
async
deleted
(
page
)
{
WIKI
.
logger
.
info
(
`(STORAGE/DISK) Deleting file
${
page
.
path
}
...`
)
let
fileName
=
`
${
page
.
path
}
.
${
getFileExtension
(
page
.
contentType
)}
`
if
(
WIKI
.
config
.
lang
.
namespacing
&&
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
if
(
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
fileName
=
`
${
page
.
localeCode
}
/
${
fileName
}
`
}
const
filePath
=
path
.
join
(
this
.
config
.
path
,
fileName
)
...
...
@@ -88,7 +88,7 @@ module.exports = {
let
sourceFilePath
=
`
${
page
.
sourcePath
}
.
${
getFileExtension
(
page
.
contentType
)}
`
let
destinationFilePath
=
`
${
page
.
destinationPath
}
.
${
getFileExtension
(
page
.
contentType
)}
`
if
(
WIKI
.
config
.
lang
.
namespacing
&&
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
if
(
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
sourceFilePath
=
`
${
page
.
localeCode
}
/
${
sourceFilePath
}
`
destinationFilePath
=
`
${
page
.
localeCode
}
/
${
destinationFilePath
}
`
}
...
...
@@ -108,7 +108,7 @@ module.exports = {
objectMode
:
true
,
transform
:
async
(
page
,
enc
,
cb
)
=>
{
let
fileName
=
`
${
page
.
path
}
.
${
getFileExtension
(
page
.
contentType
)}
`
if
(
WIKI
.
config
.
lang
.
namespacing
&&
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
if
(
WIKI
.
config
.
lang
.
code
!==
page
.
localeCode
)
{
fileName
=
`
${
page
.
localeCode
}
/
${
fileName
}
`
}
WIKI
.
logger
.
info
(
`(STORAGE/DISK) Dumping
${
fileName
}
...`
)
...
...
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