MantisBT: master-1.2.x c08e6531

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2012-05-18 07:19 master-1.2.x 8092900c
Affected Issues  0014273: Unnecessary use of array_reverse to display bug revisions
Changeset

Remove unnecessary use of array_reverse() to display bug revisions

Prior to this commit, in bug_revision_view_page.php the array returned
by functions bug_revision_list() and bug_revision_like() was
sytematically reversed by calling array_reverse().

Since these 2 functions are not used anywhere else, it is more efficient
to modify the SQL so that the functions sort the list as it should be
right from the start, thus avoiding the calls to array_reverse().

Note that the ORDER BY clause has been changed from 'timestamp' to 'id',
this guarantees correct display order in case the timestamps are equal
since by definition the id is a sequential number increased with each
revision as it is recorded.

Fixes 0014273

mod - bug_revision_view_page.php Diff File
mod - core/bug_revision_api.php Diff File