aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-xinc/poche/Poche.class.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 4ec724f9..1a5cbe6c 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -406,8 +406,9 @@ class Poche
406 /* 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 */ 406 /* 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 */
407 case 'random': 407 case 'random':
408 Tools::logm('get a random article'); 408 Tools::logm('get a random article');
409 if ($this->store->getRandomId($this->user->getId())) { 409 $view = $_GET['view'];
410 $id_array = $this->store->getRandomId($this->user->getId()); 410 if ($this->store->getRandomId($this->user->getId(),$view)) {
411 $id_array = $this->store->getRandomId($this->user->getId(),$view);
411 $id = $id_array[0]; 412 $id = $id_array[0];
412 Tools::redirect('?view=view&id=' . $id[0]); 413 Tools::redirect('?view=view&id=' . $id[0]);
413 Tools::logm('got the article with id ' . $id[0]); 414 Tools::logm('got the article with id ' . $id[0]);
@@ -522,7 +523,7 @@ class Poche
522 $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' )); 523 $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' ));
523 $tpl_vars['page_links'] = $page_links; 524 $tpl_vars['page_links'] = $page_links;
524 $tpl_vars['nb_results'] = $count; 525 $tpl_vars['nb_results'] = $count;
525 $tpl_vars['searchterm'] = $search; 526 $tpl_vars['search_term'] = $search;
526 } 527 }
527 break; 528 break;
528 case 'view': 529 case 'view':
@@ -578,6 +579,7 @@ class Poche
578 'page_links' => '', 579 'page_links' => '',
579 'nb_results' => '', 580 'nb_results' => '',
580 'listmode' => (isset($_COOKIE['listmode']) ? true : false), 581 'listmode' => (isset($_COOKIE['listmode']) ? true : false),
582 'view' => $view,
581 ); 583 );
582 584
583 //if id is given - we retrieve entries by tag: id is tag id 585 //if id is given - we retrieve entries by tag: id is tag id