A free, self-hostable news aggregator…
Suppression des 'notes' sur les articles, pas utile
Marien Fressinaud3ba63a170ec3
diff --git a/app/controllers/entryController.php b/app/controllers/entryController.phpindex 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.phpindex 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.phpindex 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.phtmldeleted file mode 100644index 061060106..000000000--- a/app/views/entry/note.phtml+++ /dev/null@@ -1,65 +0,0 @@-<?php $this->partial ('aside_flux'); ?>--<div class="post">- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>-- <form method="post" action="<?php echo _url ('entry', 'note', 'id', $this->entry->id ()); ?>">- <legend><?php echo Translate::t ('note'); ?></legend>-- <div class="form-group">- <label class="group-name" for="note"><?php echo Translate::t ('add_note'); ?></label>- <div class="group-controls">- <textarea rows="5" cols="80" name="note" id="note"><?php echo $this->entry->notes (); ?></textarea>- </div>- </div>- <div class="form-group">- <label class="group-name" for="public_note"><?php echo Translate::t ('ask_public_article'); ?></label>- <div class="group-controls">- <label class="checkbox" for="public">- <input type="checkbox" name="public" id="public" value="yes"<?php echo $this->entry->isPublic () ? ' checked="checked"' : ''; ?> /> <?php echo Translate::t ('yes'); ?>- </label>- </div>- </div>-- <div class="form-group form-actions">- <div class="group-controls">- <button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button>- <button type="reset" class="btn"><?php echo Translate::t ('cancel'); ?></button>- </div>- </div>-- <legend><?php echo Translate::t ('article'); ?></legend>-- <div class="form-group">- <label class="group-name"><?php echo Translate::t ('title'); ?></label>- <div class="group-controls">- <span class="control"><a href="<?php echo $this->entry->link (); ?>"><?php echo $this->entry->title (); ?></a></span>- </div>- </div>-- <?php- $author = $this->entry->author ();- if ($author) { ?>- <div class="form-group">- <label class="group-name"><?php echo Translate::t ('author'); ?></label>- <div class="group-controls">- <span class="control"><?php echo $author; ?></span>- </div>- </div>- <?php } ?>-- <div class="form-group">- <label class="group-name"><?php echo Translate::t ('publication_date'); ?></label>- <div class="group-controls">- <span class="control"><?php echo $this->entry->date (); ?></span>- </div>- </div>-- <div class="form-group">- <label class="group-name"><?php echo Translate::t ('article'); ?></label>- <div class="group-controls">- <span class="control"><?php echo $this->entry->content (); ?></span>- </div>- </div>- </form>-</div>diff --git a/app/views/index/index.phtml b/app/views/index/index.phtmlindex 1a07cdb46..30df591eb 100644--- a/app/views/index/index.phtml+++ b/app/views/index/index.phtml@@ -76,13 +76,6 @@ if ($output == 'rss') {</div><ul class="horizontal-list bottom">- <li class="item">- <?php if ($item->notes () != '') { ?>- <i class="icon i_note"></i> <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>"><?php echo Translate::t ('update_note'); ?></a>- <?php } else { ?>- <i class="icon i_note_empty"></i> <a class="note" href="<?php echo _url ('entry', 'note', 'id', $item->id ()); ?>"><?php echo Translate::t ('add_note'); ?></a>- <?php } ?>- </li><li class="item"><div class="dropdown"><div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>