Permalink
Browse files

fixed link to news in activity http://my.candycane.jp/issues/show/118

  • Loading branch information...
yandod committed May 10, 2011
1 parent 1d86d05 commit 75fdcd1979bec8900af6cbbe474565bb8861ef5d
Showing with 11 additions and 5 deletions.
  1. +10 −4 app/controllers/projects_controller.php
  2. +1 −1 app/models/news.php
@@ -653,11 +653,15 @@ function activity()
$this->set('author', $author);
$with_subprojects = ($this->_get_param('with_subprojects')!=null) ? $this->Setting->display_subprojects_issues : ($this->_get_param('with_subprojects') == '1');
$this->Fetcher->fetch($this->current_user, array(
'project' => $this->_project,
$condition = array(
//'project' => $this->_project,
'with_subprojects' => $with_subprojects,
'author' => $author['User'],
));
);
if (isset($this->_project)) {
$condition['project'] = $this->_project;
}
$this->Fetcher->fetch($this->current_user,$condition);
$scope = $this->Fetcher->scope_select('_callback_activity_scope_select');
if (empty($scope)) {
$this->Fetcher->set_scope(empty($author) ? 'default' : 'all');
@@ -673,7 +677,9 @@ function activity()
$this->set('activity_event_types', $this->Fetcher->event_types());
$this->set('activity_scope', $this->Fetcher->scope);
$this->set('active_children', $this->Project->active_children($this->_project['Project']['id']));
if (isset($this->_project)) {
$this->set('active_children', $this->Project->active_children($this->_project['Project']['id']));
}
$this->set('with_subprojects', $with_subprojects);
$this->set('param_user_id', $this->_get_param('user_id'));
$this->set('rss_token', $this->Project->User->rss_key($this->current_user['id']));
View
@@ -47,7 +47,7 @@ class News extends AppModel
'Event' => array('url' => array('Proc' => '_event_url')),
);
function _event_url($data) {
return array('controller'=>'news', 'action'=>'show', 'id'=>$data['News']['id']);
return array('controller'=>'news', 'action'=>'show', 'id'=>$data['News']['id'], 'project_id' => $data['Project']['id']);
}
// # returns latest news for projects visible by user

0 comments on commit 75fdcd1

Please sign in to comment.