ezsystems/ezpublish — pull request #393 by jjCavalleri (2012-08-09 21:28:31+00:00)
Title: Fixed #19556: Class and Attribute identifier duplications

There are 3 ways in which class and / or attributes identifiers can be duplicated:
. class identifier with over 50 chars where the first 50 already exist (trimmed on the database)
. attribute identifier with over 50 chars where the first 50 already exist (trimmed on the database)
. copying a class with an identifier longer then 50 characters, where a "copy_of_" already exists.

In this (suggested) fix,
. admin and admin2 class/edit templates are updated so that the identifier input field has maxlength = 50
. class and attribute identifiers are trimmed to 50 chars before checking for duplications in the database
. class identifiers of copied classes, with more then 50 chars are renamed to copy_$n_of_$class instead of copy_of_$class$n