From 3ba63a170ec385910f2e743c648dd977c5eee135 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 15 Jun 2013 13:25:48 +0200 Subject: Suppression des 'notes' sur les articles, pas utile --- app/controllers/entryController.php | 71 ------------------------------------- app/i18n/en.php | 4 --- app/i18n/fr.php | 4 --- app/views/entry/note.phtml | 65 --------------------------------- app/views/index/index.phtml | 7 ---- 5 files changed, 151 deletions(-) delete mode 100644 app/views/entry/note.phtml 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 (); - } - } } diff --git a/app/i18n/en.php b/app/i18n/en.php index 30bed791f..0d0ab5269 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -155,10 +155,6 @@ return array ( 'by_email' => 'By mail', 'on_shaarli' => 'On your Shaarli', - 'note' => 'Note', - 'add_note' => 'Add a note', - 'update_note' => 'Update your note', - 'ask_public_article' => 'Public article?', 'article' => 'Article', 'title' => 'Title', 'author' => 'Author', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 87b87945f..97e36f923 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -155,10 +155,6 @@ return array ( 'by_email' => 'Par mail', 'on_shaarli' => 'Sur votre Shaarli', - 'note' => 'Note', - 'add_note' => 'Ajouter une note', - 'update_note' => 'Modifier votre note', - 'ask_public_article' => 'Article public ?', 'article' => 'Article', 'title' => 'Titre', 'author' => 'Auteur', diff --git a/app/views/entry/note.phtml b/app/views/entry/note.phtml deleted file mode 100644 index 061060106..000000000 --- a/app/views/entry/note.phtml +++ /dev/null @@ -1,65 +0,0 @@ -partial ('aside_flux'); ?> - -
- - -
- - -
- -
- -
-
-
- -
- -
-
- -
-
- - -
-
- - - - - - entry->author (); - if ($author) { ?> -
- -
- -
-
- - -
- -
- entry->date (); ?> -
-
- -
- -
- entry->content (); ?> -
-
-
-
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 1a07cdb46..30df591eb 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -76,13 +76,6 @@ if ($output == 'rss') {