elgg-gitbot / test

0 stars 0 forks source link

Tag order is reversed (Trac #538) #15

Closed elgg-gitbot closed 11 years ago

elgg-gitbot commented 11 years ago

Original ticket http://trac.elgg.org/ticket/538 on 38862411-02-12 by trac user kevinjardine, assigned to unknown.

Elgg version: Github Master

If I enter three tags, eg. "Toronto, Leiden, Winnipeg" in a profile form, the display order is reversed when I view my profile.

This is not an alphabetical sort, but just a reversal, presumably because as usual Elgg displays the most recently created metadata item first.

Suggestion - use array_reverse to reverse the results of string_to_tag_array in metadata.php before that function returns its tag array.

elgg-gitbot commented 11 years ago

cash wrote on 39882500-12-25

I hate this bug. It just annoys me.

Attached is a patch. It assures that array order is preserved for metadata when using get_metadata_byname() [which is what ElggEntity->get uses].

elgg-gitbot commented 11 years ago

Attachment added by cash on 39882501-10-11: metadata_array_order.diff

elgg-gitbot commented 11 years ago

brettp wrote on 40029981-09-26

(In [svn:3793]) Fixes #538. Applied Cash's patch. This is an old one...jeepers.