Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Sorting in buglist is now preserved when going to next or prev page.
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@344 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
myplacedk committed Aug 2, 2001
1 parent eaba1e2 commit 978af73
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,5 +1,6 @@
Mantis

* Fixed sorting in buglist is now preserved when going to next or prev page.
* Fixed sorting in buglist. Bugs with high priority is now always first.

07.29.2001 - 0.15.3
Expand Down
9 changes: 5 additions & 4 deletions view_all_bug_page.php3
Expand Up @@ -67,14 +67,15 @@
### same sort order
if ( isset( $f_dir ) ) {
if ( $f_dir=="ASC" ) {
$f_dir = "DESC";
$f_dir_new = "DESC";
}
else {
$f_dir = "ASC";
$f_dir_new = "ASC";
}
}
else {
$f_dir = "DESC";
$f_dir = "ASC";
$f_dir_new = "DESC";
}

### build our query string based on our viewing criteria
Expand Down Expand Up @@ -116,7 +117,7 @@
if ( !isset( $f_sort ) ) {
$f_sort="last_updated";
}
$query = $query." ORDER BY priority desc, '$f_sort' $f_dir";
$query = $query." ORDER BY priority desc, '$f_sort' $f_dir_new";
if ( isset( $f_limit_view ) ) {
$query = $query." LIMIT $f_offset, $f_limit_view";
}
Expand Down
28 changes: 14 additions & 14 deletions view_all_inc.php
Expand Up @@ -120,33 +120,33 @@
 
</td>
<td width="8%">
<? print_view_bug_sort_link( $link_page, $s_id, "id", $f_dir ) ?>
<? print_sort_icon( $f_dir, $f_sort, "id" ) ?>
<? print_view_bug_sort_link( $link_page, $s_id, "id", $f_dir_new ) ?>
<? print_sort_icon( $f_dir_new, $f_sort, "id" ) ?>
</td>
<td width="3%">
<b>
#
</b>
</td>
<td width="12%">
<? print_view_bug_sort_link( $link_page, $s_category, "category", $f_dir ) ?>
<? print_sort_icon( $f_dir, $f_sort, "category" ) ?>
<? print_view_bug_sort_link( $link_page, $s_category, "category", $f_dir_new ) ?>
<? print_sort_icon( $f_dir_new, $f_sort, "category" ) ?>
</td>
<td width="10%">
<? print_view_bug_sort_link( $link_page, $s_severity, "severity", $f_dir ) ?>
<? print_sort_icon( $f_dir, $f_sort, "severity" ) ?>
<? print_view_bug_sort_link( $link_page, $s_severity, "severity", $f_dir_new ) ?>
<? print_sort_icon( $f_dir_new, $f_sort, "severity" ) ?>
</td>
<td width="10%">
<? print_view_bug_sort_link( $link_page, $s_status, "status", $f_dir ) ?>
<? print_sort_icon( $f_dir, $f_sort, "status" ) ?>
<? print_view_bug_sort_link( $link_page, $s_status, "status", $f_dir_new ) ?>
<? print_sort_icon( $f_dir_new, $f_sort, "status" ) ?>
</td>
<td width="12%">
<? print_view_bug_sort_link( $link_page, $s_updated, "last_updated", $f_dir ) ?>
<? print_sort_icon( $f_dir, $f_sort, "last_updated" ) ?>
<? print_view_bug_sort_link( $link_page, $s_updated, "last_updated", $f_dir_new ) ?>
<? print_sort_icon( $f_dir_new, $f_sort, "last_updated" ) ?>
</td>
<td width="43%">
<? print_view_bug_sort_link( $link_page, $s_summary, "summary", $f_dir ) ?>
<? print_sort_icon( $f_dir, $f_sort, "summary" ) ?>
<? print_view_bug_sort_link( $link_page, $s_summary, "summary", $f_dir_new ) ?>
<? print_sort_icon( $f_dir_new, $f_sort, "summary" ) ?>
</td>
</tr>
<tr height="5">
Expand Down Expand Up @@ -259,10 +259,10 @@
}

if ( $f_offset_prev >= 0 ) {
print_bracket_link( $link_page."?f_offset=".$f_offset_prev, "View Prev ".$f_limit_view );
print_bracket_link( $link_page."?f_sort=".$f_sort."&f_dir=".$f_dir."&f_offset=".$f_offset_prev, "View Prev ".$f_limit_view );
}
if ( $row_count == $f_limit_view ) {
print_bracket_link( $link_page."?f_offset=".$f_offset_next, "View Next ".$f_limit_view );
print_bracket_link( $link_page."?f_sort=".$f_sort."&f_dir=".$f_dir."&f_offset=".$f_offset_next, "View Next ".$f_limit_view );
}
?>
</div>

0 comments on commit 978af73

Please sign in to comment.