mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
Merge branch '6.0'
Conflicts: seahub/api2/endpoints/file.py seahub/urls.py static/scripts/app/views/share.js
This commit is contained in:
@@ -583,6 +583,11 @@ define([
|
||||
return false;
|
||||
};
|
||||
|
||||
if (dirent_name.indexOf('/') != -1) {
|
||||
Common.showFormError(form_id, gettext("Name should not include '/'."));
|
||||
return false;
|
||||
}
|
||||
|
||||
var post_data = { 'operation': 'mkdir' },
|
||||
post_url = Common.getUrl({name: "new_dir", repo_id: dir.repo_id})
|
||||
+ '?p=' + encodeURIComponent(Common.pathJoin([dir.path, dirent_name]));
|
||||
@@ -639,6 +644,11 @@ define([
|
||||
return false;
|
||||
};
|
||||
|
||||
if (dirent_name.indexOf('/') != -1) {
|
||||
Common.showFormError(form_id, gettext("Name should not include '/'."));
|
||||
return false;
|
||||
}
|
||||
|
||||
// if it has an extension, make sure it has a name
|
||||
if (dirent_name.lastIndexOf('.') != -1 && dirent_name.substr(0, dirent_name.lastIndexOf('.')).length == 0) {
|
||||
Common.showFormError(form_id, gettext("Only an extension there, please input a name."));
|
||||
|
Reference in New Issue
Block a user