diff options
Diffstat (limited to 'app/controllers/entryController.php')
| -rwxr-xr-x | app/controllers/entryController.php | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/app/controllers/entryController.php b/app/controllers/entryController.php index 35f3150ea..9d6d9a944 100755 --- a/app/controllers/entryController.php +++ b/app/controllers/entryController.php @@ -97,75 +97,4 @@ class entryController extends ActionController { } } } - - public function noteAction () { - View::appendScript (Url::display (array ('c' => 'javascript', 'a' => 'main'))); - - $not_found = false; - $entryDAO = new EntryDAO (); - $catDAO = new CategoryDAO (); - - $id = Request::param ('id'); - if ($id) { - $entry = $entryDAO->searchById ($id); - - if ($entry) { - $feed = $entry->feed (true); - - if (Request::isPost ()) { - $note = htmlspecialchars (Request::param ('note', '')); - $public = Request::param ('public', 'no'); - if ($public == 'yes') { - $public = true; - } else { - $public = false; - } - - $values = array ( - 'annotation' => $note, - 'is_public' => $public, - 'lastUpdate' => time () - ); - - if ($entryDAO->updateEntry ($id, $values)) { - $notif = array ( - 'type' => 'good', - 'content' => Translate::t ('updated') - ); - } else { - $notif = array ( - 'type' => 'bad', - 'content' => Translate::t ('error_occured') - ); - } - Session::_param ('notification', $notif); - Request::forward (array ( - 'c' => 'entry', - 'a' => 'note', - 'params' => array ( - 'id' => $id - ) - ), true); - } - } else { - $not_found = true; - } - } else { - $not_found = true; - } - - if ($not_found) { - Error::error ( - 404, - array ('error' => array (Translate::t ('page_not_found'))) - ); - } else { - $this->view->entry = $entry; - $this->view->cat_aside = $catDAO->listCategories (); - $this->view->nb_favorites = $entryDAO->countFavorites (); - $this->view->nb_total = $entryDAO->count (); - $this->view->get_c = $feed->category (); - $this->view->get_f = $feed->id (); - } - } } |
