aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
authorNumEricR <eric.github@gmail.com>2013-08-27 16:02:25 +0200
committerNumEricR <eric.github@gmail.com>2013-08-27 16:03:50 +0200
commit3eb049036e601c1978cf5f7f0d5be8c577933b72 (patch)
tree9a8504d70de6b69d18f4d44de88ad4a304a089e6 /inc
parent093f1efb213ce43e76ad7416eef347c80d8b0e17 (diff)
downloadwallabag-3eb049036e601c1978cf5f7f0d5be8c577933b72.tar.gz
wallabag-3eb049036e601c1978cf5f7f0d5be8c577933b72.tar.zst
wallabag-3eb049036e601c1978cf5f7f0d5be8c577933b72.zip
Add warning message when there is no entry in current view
Diffstat (limited to 'inc')
-rw-r--r--inc/poche/Poche.class.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 57e8b7b3..a8f64151 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -259,13 +259,17 @@ class Poche
259 break; 259 break;
260 default: # home, favorites and archive views 260 default: # home, favorites and archive views
261 $entries = $this->store->getEntriesByView($view, $this->user->getId()); 261 $entries = $this->store->getEntriesByView($view, $this->user->getId());
262 $this->pagination->set_total(count($entries));
263 $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&');
264 $datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit());
265 $tpl_vars = array( 262 $tpl_vars = array(
266 'entries' => $datas, 263 'entries' => '',
267 'page_links' => $page_links, 264 'page_links' => '',
268 ); 265 );
266 if (count($entries) > 0) {
267 $this->pagination->set_total(count($entries));
268 $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&');
269 $datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit());
270 $tpl_vars['entries'] = $datas;
271 $tpl_vars['page_links'] = $page_links;
272 }
269 Tools::logm('display ' . $view . ' view'); 273 Tools::logm('display ' . $view . ' view');
270 break; 274 break;
271 } 275 }