diff options
-rwxr-xr-x | inc/poche/Poche.class.php | 7 | ||||
-rwxr-xr-x | themes/baggy/css/main.css | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index fb74ab9a..f9928145 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -349,8 +349,11 @@ class Poche | |||
349 | 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 */ | 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': | 351 | case 'random': |
352 | $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); | 352 | $id = 0; |
353 | $id = rand(1,$count); | 353 | while ($this->store->retrieveOneById($id,$this->user->getId()) == null) { |
354 | $count = $this->store->getEntriesByViewCount($view, $this->user->getId()); | ||
355 | $id = rand(1,$count); | ||
356 | } | ||
354 | Tools::logm('get a random article'); | 357 | Tools::logm('get a random article'); |
355 | Tools::redirect('?view=view&id=' . $id); | 358 | Tools::redirect('?view=view&id=' . $id); |
356 | //$this->displayView('view', $id); | 359 | //$this->displayView('view', $id); |
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 9356deda..90d546fc 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css | |||
@@ -737,7 +737,10 @@ a.add-to-wallabag-link-after:after { | |||
737 | content: "\e80d"; | 737 | content: "\e80d"; |
738 | } | 738 | } |
739 | .icon-random:before { | 739 | .icon-random:before { |
740 | content: "\e915"; | 740 | content: "\e915"; |
741 | } | ||
742 | .icon-reload:before { | ||
743 | content: "\ea2e"; | ||
741 | } | 744 | } |
742 | 745 | ||
743 | 746 | ||