Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix #308

  • Loading branch information...
commit 2f3a78a993baaff8648e33bb8d0b812e49e9d46a 1 parent 147456a
Yusuke Ando authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  app/Controller/WatchersController.php
3  app/Controller/WatchersController.php
View
@@ -33,12 +33,13 @@ public function add()
$this->RequestHandler->isPost() &&
!empty($this->request->data['Watcher']['user_id'])
) {
- $Model = & ClassRegistry::init($this->request->params['named']['object_type']);
+ $Model = & ClassRegistry::init(ucfirst($this->request->params['named']['object_type']));
if(
$Model->read(null, $this->request->params['named']['object_id']) &&
$this->Watcher->User->read(null, $this->request->data['Watcher']['user_id'])
) {
$Model->add_watcher($this->Watcher->User->data);
+ $this->redirect(env('HTTP_REFERER'));
}
}
//Configure::write('debug', 0);
Please sign in to comment.
Something went wrong with that request. Please try again.