fixed: DataForm will create fields with duplicate names but doesn't use them separately
This commit is contained in:
parent
dd6f6ef461
commit
5bc3ebfd43
2 changed files with 8 additions and 0 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
- fixed: Collaboration System threads can return other object types when asked for replies
|
- fixed: Collaboration System threads can return other object types when asked for replies
|
||||||
- fixed: Able to cut or trash system assets
|
- fixed: Able to cut or trash system assets
|
||||||
- fixed: Can't purge uncommitted assets if not using its version tag
|
- fixed: Can't purge uncommitted assets if not using its version tag
|
||||||
|
- fixed: DataForm will create fields with duplicate names but doesn't use them separately
|
||||||
|
|
||||||
7.5.7
|
7.5.7
|
||||||
- fixed: HttpProxy mixes original site's content encoding with WebGUI's
|
- fixed: HttpProxy mixes original site's content encoding with WebGUI's
|
||||||
|
|
|
||||||
|
|
@ -1068,6 +1068,13 @@ sub www_editFieldSave {
|
||||||
my $name = $self->session->url->urlize($form->process("name") || $form->process("label"));
|
my $name = $self->session->url->urlize($form->process("name") || $form->process("label"));
|
||||||
$name =~ s/\-//g;
|
$name =~ s/\-//g;
|
||||||
$name =~ s/\///g;
|
$name =~ s/\///g;
|
||||||
|
my $exists = 1;
|
||||||
|
while ($exists) {
|
||||||
|
$exists = $self->session->db->quickScalar('SELECT DataForm_fieldId FROM DataForm_field WHERE assetId=? AND name=?', [$self->getId, $name]);
|
||||||
|
if ($exists) {
|
||||||
|
$name =~ s/(\d+|)$/$1 + 1/e; # increment number at the end of the name
|
||||||
|
}
|
||||||
|
}
|
||||||
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
$self->setCollateral("DataForm_field","DataForm_fieldId",{
|
||||||
DataForm_fieldId=>$form->process("fid"),
|
DataForm_fieldId=>$form->process("fid"),
|
||||||
width=>$form->process("width", 'integer'),
|
width=>$form->process("width", 'integer'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue