aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/entryController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-06-15 13:25:48 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-06-15 13:25:48 +0200
commit3ba63a170ec385910f2e743c648dd977c5eee135 (patch)
tree1ee4393f68496e6ec88c57aa8e2e396bb096ca88 /app/controllers/entryController.php
parent215b0a564e00874367a2730f204f967a1c336ebc (diff)
Suppression des 'notes' sur les articles, pas utile
Diffstat (limited to 'app/controllers/entryController.php')
-rwxr-xr-xapp/controllers/entryController.php71
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 ();
- }
- }
}