#460 Invalid projedc names
This commit is contained in:
parent
571187aae4
commit
514775c42b
@ -128,7 +128,7 @@ module RedmineDmsf
|
||||
prj = Project.visible.find_by(id: $1)
|
||||
if prj
|
||||
# Check again whether it's really the project and not a folder with a number as a suffix
|
||||
prj = nil unless pinfo.first =~ /^#{prj.name}/
|
||||
prj = nil unless pinfo.first =~ /^#{DmsfFolder::get_valid_title(prj.name)}/
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -156,7 +156,7 @@ module RedmineDmsf
|
||||
prj = Project.visible.find_by(id: $1)
|
||||
if prj
|
||||
# Check again whether it's really the project and not a folder with a number as a suffix
|
||||
prj = nil unless pinfo.first =~ /^#{prj.name}/
|
||||
prj = nil unless pinfo.first =~ /^#{DmsfFolder::get_valid_title(prj.name)}/
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
@ -114,7 +114,7 @@ module RedmineDmsf
|
||||
@subproject = Project.visible.find_by(id: $1, parent_id: parent_project&.id)
|
||||
if @subproject
|
||||
# Check again whether it's really the project and not a folder with a number as a suffix
|
||||
@subproject = nil unless basename =~ /^#{@subproject.name}/
|
||||
@subproject = nil unless basename =~ /^#{DmsfFolder::get_valid_title(@subproject.name)}/
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user