jsharmony-cms 1.8.0 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/models/_funcs.branch.js
CHANGED
|
@@ -364,8 +364,10 @@ module.exports = exports = function(module, funcs){
|
|
|
364
364
|
},
|
|
365
365
|
], function(err){
|
|
366
366
|
if(err) return Helper.GenError(req, res, -99999, err.toString());
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
HelperFS.tryUnlink(zip_file, function(){
|
|
368
|
+
//Return success
|
|
369
|
+
return res.send(JSON.stringify({ _success: 1 }));
|
|
370
|
+
});
|
|
369
371
|
});
|
|
370
372
|
});
|
|
371
373
|
}
|
package/models/_funcs.deploy.js
CHANGED
|
@@ -2026,6 +2026,7 @@ module.exports = exports = function(module, funcs){
|
|
|
2026
2026
|
};
|
|
2027
2027
|
|
|
2028
2028
|
exports.deploy_fs = function(deployment, publish_path, deploy_path, site_files, cb){
|
|
2029
|
+
var jsh = module.jsh;
|
|
2029
2030
|
var deployment_id = deployment.deployment_id;
|
|
2030
2031
|
var deployment_target_publish_path = (deployment.deployment_target_publish_path||'').toString();
|
|
2031
2032
|
|
|
@@ -2044,6 +2045,8 @@ module.exports = exports = function(module, funcs){
|
|
|
2044
2045
|
}
|
|
2045
2046
|
}
|
|
2046
2047
|
|
|
2048
|
+
if(!path.isAbsolute(deploy_path)) deploy_path = path.join(jsh.Config.datadir, deploy_path);
|
|
2049
|
+
|
|
2047
2050
|
var found_files = {};
|
|
2048
2051
|
var found_folders = {};
|
|
2049
2052
|
|
package/models/_funcs.page.js
CHANGED
|
@@ -310,7 +310,7 @@ module.exports = exports = function(module, funcs){
|
|
|
310
310
|
|
|
311
311
|
if(newURL!=url){
|
|
312
312
|
content = content.substr(0, startofstr) + newURL + content.substr(endofstr + 1);
|
|
313
|
-
rtagidx = endofstr;
|
|
313
|
+
rtagidx = endofstr + (newURL.length - url.length);
|
|
314
314
|
}
|
|
315
315
|
rtagidx = content.indexOf(rtag, rtagidx + 1);
|
|
316
316
|
}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
92
|
{ "on": ["validate_update"], "exec": [
|
|
93
|
-
"errorif(update(branch_name) and exists(select * from {schema}.branch b2 where b2.branch_name=inserted(branch_name) and $ifnull(b2.branch_user_id,0)=$ifnull(inserted(branch_user_id),0) and b2.site_id=inserted(site_id)),'Another revision with the same name already exists');"
|
|
93
|
+
"errorif(update(branch_name) and exists(select * from {schema}.branch b2 where b2.branch_name=inserted(branch_name) and (b2.branch_id<>inserted(branch_id)) and $ifnull(b2.branch_user_id,0)=$ifnull(inserted(branch_user_id),0) and b2.site_id=inserted(site_id)),'Another revision with the same name already exists');"
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
96
|
{ "on": ["update", "insert"], "exec": [
|
|
@@ -380,6 +380,7 @@
|
|
|
380
380
|
"v_my_branch_access": {
|
|
381
381
|
"type": "view",
|
|
382
382
|
"caption": ["Branch", "Branches"],
|
|
383
|
+
"dependencies": ["{schema}.v_sys_user_site_access"],
|
|
383
384
|
"tables": {
|
|
384
385
|
"branch": {
|
|
385
386
|
"columns": [
|