Forum OpenACS Development: category::get_children sort by tree order
I'd like to add an optional -order switch so it sorts by the tree order defined in category admin.
Can you check the existing calls to this procedure and see if the callers are already sorting the output? It might make sense to default to sorted output, I don't see much use for unsorted output.
It does a db_list then a foreach on the list to put the output into a list!
Then it checks for empty string on the output instead of llength 0.
I am also not sure why the result is "0" instead of just an empty list if there aren't any children. That seems weird.
Only planner and learning-content packages use category::get_children. In a few places, they do an lsort -increasing on the children ids. A sort of the children in the proc would only affect these existing calls (the children would be sorted twice).