1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-25 19:17:03 +00:00
This commit is contained in:
Thomas Citharel 2015-02-01 12:05:10 +01:00
commit d4b6e20e2f
10 changed files with 57 additions and 40 deletions

View file

@ -337,6 +337,7 @@ class Poche
$this->messages->add('s', _('The tag has been successfully deleted'));
Tools::redirect();
break;
case 'reload_article' :
Tools::logm('reload article');
$id = $_GET['id'];
@ -346,6 +347,14 @@ class Poche
$this->action('add', $url);
break;
/* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */
case 'random':
$count = $this->store->getEntriesByViewCount($view, $this->user->getId());
$id = rand(1,$count);
Tools::logm('get a random article');
Tools::redirect('?view=view&id=' . $id);
//$this->displayView('view', $id);
break;
default:
break;
}