Change route to remove ability to pass through due status
This commit is contained in:
		| @@ -837,13 +837,13 @@ class IDF_Views_Issue | |||||||
|     public function listOverdue($request, $match) |     public function listOverdue($request, $match) | ||||||
|     { |     { | ||||||
|         $prj = $request->project; |         $prj = $request->project; | ||||||
|         $status = $match[2]; |         $status = __('Overdue'); | ||||||
|  |  | ||||||
|         $title = sprintf(__('%s %s Issues'), (string) $prj, (string) $status); |         $title = sprintf(__('%s %s Issues'), (string) $prj, (string) $status); | ||||||
|         // Get stats about the issues |         // Get stats about the issues | ||||||
|         $open = $prj->getIssueCountByStatus('open'); |         $open = $prj->getIssueCountByStatus('open'); | ||||||
|         $closed = $prj->getIssueCountByStatus('closed'); |         $closed = $prj->getIssueCountByStatus('closed'); | ||||||
|         $overdue = $prj->getIssueCountByDueDate('overdue'); |         $overdue = $prj->getIssueCountByDueDate(); | ||||||
|         // Paginator to paginate the issues |         // Paginator to paginate the issues | ||||||
|         $pag = new Pluf_Paginator(new IDF_Issue()); |         $pag = new Pluf_Paginator(new IDF_Issue()); | ||||||
|         $pag->class = 'recent-issues'; |         $pag->class = 'recent-issues'; | ||||||
| @@ -853,12 +853,7 @@ class IDF_Views_Issue | |||||||
|         $pag->summary = __('This table shows the overdue issues.'); |         $pag->summary = __('This table shows the overdue issues.'); | ||||||
|         $otags = $prj->getTagIdsByStatus('open'); |         $otags = $prj->getTagIdsByStatus('open'); | ||||||
|         if (count($otags) == 0) $otags[] = 0; |         if (count($otags) == 0) $otags[] = 0; | ||||||
|         if ('Undue' == $status) { |         $pag->forced_where = new Pluf_SQL('project=%s AND due_dtime < NOW() AND status IN ('.implode(', ', $otags).')', array($prj->id)); | ||||||
|             $where = 'AND due_dtime >= NOW()'; |  | ||||||
|         } else { |  | ||||||
|             $where = 'AND due_dtime < NOW()'; |  | ||||||
|         } |  | ||||||
|         $pag->forced_where = new Pluf_SQL('project=%s ' . $where . ' AND status IN ('.implode(', ', $otags).')', array($prj->id)); |  | ||||||
|         $pag->action = array('IDF_Views_Issue::listOverdue', array($prj->shortname, $status)); |         $pag->action = array('IDF_Views_Issue::listOverdue', array($prj->shortname, $status)); | ||||||
|         $pag->sort_order = array('due_dtime', 'DESC'); // will be reverted |         $pag->sort_order = array('due_dtime', 'DESC'); // will be reverted | ||||||
|         $pag->sort_reverse_order = array('due_dtime'); |         $pag->sort_reverse_order = array('due_dtime'); | ||||||
|   | |||||||
| @@ -163,7 +163,7 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/status/(\w+)/$#', | |||||||
|                'model' => 'IDF_Views_Issue', |                'model' => 'IDF_Views_Issue', | ||||||
|                'method' => 'listStatus'); |                'method' => 'listStatus'); | ||||||
|  |  | ||||||
| $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/(\w+)/$#', | $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/overdue/$#', | ||||||
|                'base' => $base, |                'base' => $base, | ||||||
|                'model' => 'IDF_Views_Issue', |                'model' => 'IDF_Views_Issue', | ||||||
|                'method' => 'listOverdue'); |                'method' => 'listOverdue'); | ||||||
|   | |||||||
| @@ -111,7 +111,7 @@ | |||||||
|     <tbody> |     <tbody> | ||||||
|         <tr> |         <tr> | ||||||
|         <td class="name"> |         <td class="name"> | ||||||
|         {aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'Overdue', 'due')} |         {aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'overdue', 'due')} | ||||||
|         <a href="{$url}">{blocktrans}Overdue{/blocktrans}</a> |         <a href="{$url}">{blocktrans}Overdue{/blocktrans}</a> | ||||||
|         </td> |         </td> | ||||||
|         <td class="count">{$duedateStatistics[0]}</td> |         <td class="count">{$duedateStatistics[0]}</td> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user