|
|
@@ -70,11 +70,11 @@ module.exports = function(crowi, app) {
|
|
|
actions.pageListShowWrapper = function(req, res) {
|
|
|
const behaviorType = Config.behaviorType(config);
|
|
|
|
|
|
- if ('crowi-plus' === behaviorType) {
|
|
|
- return actions.pageListShowForCrowiPlus(req, res);
|
|
|
+ if (!behaviorType || 'crowi' === behaviorType) {
|
|
|
+ return actions.pageListShow(req, res);
|
|
|
}
|
|
|
else {
|
|
|
- return actions.pageListShow(req, res);
|
|
|
+ return actions.pageListShowForCrowiPlus(req, res);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
@@ -83,11 +83,11 @@ module.exports = function(crowi, app) {
|
|
|
actions.pageShowWrapper = function(req, res) {
|
|
|
const behaviorType = Config.behaviorType(config);
|
|
|
|
|
|
- if ('crowi-plus' === behaviorType) {
|
|
|
- return actions.pageShowForCrowiPlus(req, res);
|
|
|
+ if (!behaviorType || 'crowi' === behaviorType) {
|
|
|
+ return actions.pageShow(req, res);
|
|
|
}
|
|
|
else {
|
|
|
- return actions.pageShow(req, res);
|
|
|
+ return actions.pageShowForCrowiPlus(req, res);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
@@ -96,13 +96,13 @@ module.exports = function(crowi, app) {
|
|
|
actions.trashPageListShowWrapper = function(req, res) {
|
|
|
const behaviorType = Config.behaviorType(config);
|
|
|
|
|
|
- if ('crowi-plus' === behaviorType) {
|
|
|
- // redirect to '/trash'
|
|
|
- return res.redirect('/trash');
|
|
|
+ if (!behaviorType || 'crowi' === behaviorType) {
|
|
|
+ // Crowi behavior for '/trash/*'
|
|
|
+ return actions.deletedPageListShow(req, res);
|
|
|
}
|
|
|
- // official Crowi behavior for '/trash/*'
|
|
|
else {
|
|
|
- return actions.deletedPageListShow(req, res);
|
|
|
+ // redirect to '/trash'
|
|
|
+ return res.redirect('/trash');
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
@@ -111,14 +111,14 @@ module.exports = function(crowi, app) {
|
|
|
actions.trashPageShowWrapper = function(req, res) {
|
|
|
const behaviorType = Config.behaviorType(config);
|
|
|
|
|
|
- if ('crowi-plus' === behaviorType) {
|
|
|
- // official Crowi behavior for '/trash/*'
|
|
|
- return actions.deletedPageListShow(req, res);
|
|
|
- }
|
|
|
- else {
|
|
|
+ if (!behaviorType || 'crowi' === behaviorType) {
|
|
|
// redirect to '/trash/'
|
|
|
return res.redirect('/trash/');
|
|
|
}
|
|
|
+ else {
|
|
|
+ // Crowi behavior for '/trash/*'
|
|
|
+ return actions.deletedPageListShow(req, res);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
/**
|
|
|
@@ -127,13 +127,13 @@ module.exports = function(crowi, app) {
|
|
|
actions.deletedPageListShowWrapper = function(req, res) {
|
|
|
const behaviorType = Config.behaviorType(config);
|
|
|
|
|
|
- if ('crowi-plus' === behaviorType) {
|
|
|
- const path = '/trash' + getPathFromRequest(req);
|
|
|
- return res.redirect(path);
|
|
|
+ if (!behaviorType || 'crowi' === behaviorType) {
|
|
|
+ // Crowi behavior for '/trash/*'
|
|
|
+ return actions.deletedPageListShow(req, res);
|
|
|
}
|
|
|
- // official Crowi behavior for '/trash/*'
|
|
|
else {
|
|
|
- return actions.deletedPageListShow(req, res);
|
|
|
+ const path = '/trash' + getPathFromRequest(req);
|
|
|
+ return res.redirect(path);
|
|
|
}
|
|
|
}
|
|
|
|