Fixes #3123 - Correct name length control in datalist_get and set_config

Ticket: http://trac.elgg.org/ticket/3123