fetchAttrsForObjects: fix SQL using temp table
authorAlexey Andriyanov <alan@al-an.info>
Tue, 27 May 2014 12:39:41 +0000 (16:39 +0400)
committerAlexey Andriyanov <alan@al-an.info>
Tue, 27 May 2014 12:42:08 +0000 (16:42 +0400)
commitbed133e632ec2337a94d75a063c1e443d67f917a
treee731b2a9f15bd48042ddda602b9fde5fc97c9f2a
parentab976209306ac568c1ae9a0a259f3f0e73728fc8
fetchAttrsForObjects: fix SQL using temp table

Since fetchAttrsForObjects() is called on every listCells('object') call,
there was significant performance problem due to creation of huge temptable
and filesorting it. Sorted attr value list is needed rarely and always for
a single object, so new function getAttrValuesSorted() deals with this task now.

fetchAttrsForObjects: remove ORDER BY statement.

These funcs switched from getAttrValues() to getAttrValuesSorted():
  renderRow, renderEditRowForm, renderEditObjectForm, renderEditRackForm,
  renderRackInfoPortlet, renderObject, renderLocationPage, renderEditLocationForm.
wwwroot/inc/database.php
wwwroot/inc/interface.php