Thanks!
I did not set error_reporting on my system, so was unaware
of the issue, even though I had tested it with keys that were
not in the array.
Initially I wanted to write two separate extensions:
One that does what enumcat does, without localization,
and another that does the localization in links.
example: <localize_german>[[blah|english]]
[[blah2|german]]</localize_german>
would have returned '[[blah|englisch]] [[blah2|deutsch]]'
and the idea was to combine both:
<localize_french> <enumcat>blah</enumcat> </localize_french>
unfortunately the parser does not allow to combine two extension tags:
only the outer one is evaluated, with the inner string passed as an
argument.
so maybe there would be something to improve in the parser itself?
cheers
Thomas
Brion Vibber wrote:
Thanks! Committed. A couple issues:
If used on a category which contains items that don't exactly match,
you'll get E_NOTICE warnings about uninitialized array indices if
error_reporting is turned up to E_ALL. You should check that the sort
key is represented in the array before trying to access it, and if it
doesn't find a sensible fallback behavior. (eg using the sortkey
'raw', or the title, or discarding the entry entirely)
Also, if you explicitly only want to show entries with certain sort
keys, you may want to add this to the WHERE clause in your query, such
as "cl_sortkey IN('french','german','english')" etc.
-- brion vibber (brion @
pobox.com)