Forum OpenACS Development: Re: new vers of acs_object__name(object_id)

Collapse
Posted by Jim Lynch on
where have you found this version of acs_object__name()?

I took a copy of acs_object__name(obj_id) and I altered it myself.

The current version ends up with a blank name if acs_objects.title contains <span>#</span>foo.bar# and message foo.bar in lang_messages is blank or null.

The regex looks for "<span>#</span>pkg_key.msg_key#" and splits the keys so I can query for it, and test for blank/nullness, with the idea being, if that turns out to be blank or null, it's probably not the name we want. If that's the case, I let the existing code get the name by the method that was already there, I didn't change any of that.

-Jim