From: Thomas Citharel Date: Sun, 1 Feb 2015 11:05:10 +0000 (+0100) Subject: merge X-Git-Tag: 1.9beta~22^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=d4b6e20e2f04c5e93ab77b732a1108aee1b639d6;p=github%2Fwallabag%2Fwallabag.git merge --- d4b6e20e2f04c5e93ab77b732a1108aee1b639d6 diff --cc inc/poche/Poche.class.php index a164ed47,5b8e235f..fb74ab9a --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@@ -337,15 -337,14 +337,24 @@@ class Poch $this->messages->add('s', _('The tag has been successfully deleted')); Tools::redirect(); break; ++ + case 'reload_article' : + Tools::logm('reload article'); + $id = $_GET['id']; + $entry = $this->store->retrieveOneById($id, $this->user->getId()); + Tools::logm('reload url ' . $entry['url']); + $url = new Url(base64_encode($entry['url'])); + $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; }