jsharmony-cms 1.8.1 → 1.8.2
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.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": [
|