diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-20 10:49:55 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-20 10:49:55 +0000 |
commit | 6dcfce0127bc7ea3f4bb843ddcaf44becd98d9fa (patch) | |
tree | 35bcb9c89d08421a0517c6e690f4232e07acfa99 /includes | |
parent | 8d526b10e58fa9cf3bb4eee53a7ec2310b8a595a (diff) | |
download | brdo-6dcfce0127bc7ea3f4bb843ddcaf44becd98d9fa.tar.gz brdo-6dcfce0127bc7ea3f4bb843ddcaf44becd98d9fa.tar.bz2 |
#111719 follow up patch by chx: roll back form item ID patch
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/includes/form.inc b/includes/form.inc index f5f224265..9c1062ef4 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2002,8 +2002,7 @@ function _form_set_class(&$element, $class = array()) { } /** - * Prepare an HTML ID attribute string by removing invalid characters and - * guaranteeing uniqueness. + * Remove invalid characters from an HTML ID attribute string. * * @param $id * The ID to clean. @@ -2011,19 +2010,7 @@ function _form_set_class(&$element, $class = array()) { * The cleaned ID. */ function form_clean_id($id = NULL) { - static $seen_ids = array(); - $id = str_replace(array('][', '_', ' '), '-', $id); - - // Ensure id's are unique. The first occurrence is held but left alone. - // Subsequent occurrences get a number appended to them. - if (isset($seen_ids[$id])) { - $id = $id .'-'. $seen_ids[$id]++; - } - else { - $seen_ids[$id] = 1; - } - return $id; } |