MDL-75283 core: Fetch proper column mapping for sort
commit92c332f49100f4084a2c3ef76b2b60dfe4291ccd
authorJun Pataleta <jun@moodle.com>
Wed, 7 Sep 2022 12:40:53 +0000 (7 20:40 +0800)
committerIlya Tregubov <ilya@moodle.com>
Wed, 7 Sep 2022 13:11:53 +0000 (7 17:11 +0400)
treee34e522243e5eec0e6ffd9db6518f7c1266901d4
parent49b55a357ae46326f426cb78634ed2ba445b3042
MDL-75283 core: Fetch proper column mapping for sort

Calling \core_user\fields::get_sql() incerements a static uniqueid
variable. This should be called only once and not make a separate call
for the sort mapping data as it doing so will result to an incorrect
table alias for the sort mapping data.
lib/datalib.php