aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rwxr-xr-xinc/poche/Poche.class.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 81a18c86..5b8e235f 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -337,6 +337,14 @@ 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 /* 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 */
341 case 'random':
342 $count = $this->store->getEntriesByViewCount($view, $this->user->getId());
343 $id = rand(1,$count);
344 Tools::logm('get a random article');
345 Tools::redirect('?view=view&id=' . $id);
346 //$this->displayView('view', $id);
347 break;
340 default: 348 default:
341 break; 349 break;
342 } 350 }