diff options
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-x | inc/poche/Poche.class.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a164ed47..fb74ab9a 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -337,6 +337,7 @@ class Poche | |||
337 | $this->messages->add('s', _('The tag has been successfully deleted')); | 337 | $this->messages->add('s', _('The tag has been successfully deleted')); |
338 | Tools::redirect(); | 338 | Tools::redirect(); |
339 | break; | 339 | break; |
340 | |||
340 | case 'reload_article' : | 341 | case 'reload_article' : |
341 | Tools::logm('reload article'); | 342 | Tools::logm('reload article'); |
342 | $id = $_GET['id']; | 343 | $id = $_GET['id']; |
@@ -346,6 +347,14 @@ class Poche | |||
346 | $this->action('add', $url); | 347 | $this->action('add', $url); |
347 | break; | 348 | break; |
348 | 349 | ||
350 | /* 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 */ | ||
351 | case 'random': | ||
352 | $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); | ||
353 | $id = rand(1,$count); | ||
354 | Tools::logm('get a random article'); | ||
355 | Tools::redirect('?view=view&id=' . $id); | ||
356 | //$this->displayView('view', $id); | ||
357 | break; | ||
349 | default: | 358 | default: |
350 | break; | 359 | break; |
351 | } | 360 | } |