Fixed unique_id param
This commit is contained in:
parent
73ae598c45
commit
8eb3e24a93
1 changed files with 8 additions and 2 deletions
|
@ -202,14 +202,20 @@ router.get('/:tab', function(req, res) {
|
|||
};
|
||||
if (p.url.indexOf('[id]') + 1) {
|
||||
if (id) {
|
||||
p.url = p.url.replace(/\[id]/gi, id ? id : '');
|
||||
p.url = p.url.replace(
|
||||
/\[id]/gi,
|
||||
id ? parseInt(id) - parseInt('' + config.urls.unique_id || '0') : ''
|
||||
);
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
if (p.url.indexOf('[kp_id]') + 1) {
|
||||
if (id) {
|
||||
p.url = p.url.replace(/\[kp_id]/gi, id ? id : '');
|
||||
p.url = p.url.replace(
|
||||
/\[kp_id]/gi,
|
||||
id ? parseInt(id) - parseInt('' + config.urls.unique_id || '0') : ''
|
||||
);
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue