|
From: Benjamin C. <bc...@us...> - 2001-12-19 13:52:06
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv25014
Modified Files:
bug.php query.php
Log Message:
Fixes bug #494578 - problem with previous and next links query
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- bug.php 2001/12/19 13:33:14 1.69
+++ bug.php 2001/12/19 13:52:03 1.70
@@ -554,7 +554,8 @@
$offset = $pos;
$limit = 1;
}
- $q->limit_query('select bug_id from '.TBL_BUG.' b
+ $q->limit_query('select bug_id, reporter.login as reporter, owner.login as owner
+ from '.TBL_BUG.' b
left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id
left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id
left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id
@@ -565,7 +566,7 @@
and b.os_id = os.os_id and b.version_id = version.version_id
and b.component_id = component.component_id and b.project_id = project.project_id '.
"and {$queryinfo['query']} and bug_id <> $bugid
- order by {$queryinfo['order']} {$queryinfo['sort']}", $limit, $offset);
+ order by {$queryinfo['order']} {$queryinfo['sort']}, bug_id asc", $limit, $offset);
$firstid = $q->grab_field();
$secondid = $q->grab_field();
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- query.php 2001/12/08 14:55:42 1.47
+++ query.php 2001/12/19 13:52:03 1.48
@@ -248,7 +248,7 @@
and b.os_id = os.os_id and b.version_id = version.version_id
and b.component_id = component.component_id and b.project_id = project.project_id '.
($queryinfo['query'] != '' ? "and {$queryinfo['query']} " : '').
- "order by $order $sort", $selrange, $llimit);
+ "order by $order $sort, bug_id asc", $selrange, $llimit);
$headers = array(
'bug_id' => 'bug_id',
|