diff options
author | Arno Richter <oelna@oelna.de> | 2022-12-13 23:28:38 +0100 |
---|---|---|
committer | Arno Richter <oelna@oelna.de> | 2022-12-13 23:28:38 +0100 |
commit | 67b51e9f905c568444741eaad0eb5d82df7f09c8 (patch) | |
tree | b7852e7d57e15a42f3dd752f891e8d513e3139a8 /templates/timeline.inc.php | |
parent | 0399f48a1f6a5e7151e3539038662686ed365ca7 (diff) | |
download | microblog-67b51e9f905c568444741eaad0eb5d82df7f09c8.tar.gz microblog-67b51e9f905c568444741eaad0eb5d82df7f09c8.tar.bz2 microblog-67b51e9f905c568444741eaad0eb5d82df7f09c8.zip |
make pagination more robust. add undelete method for posts, if you know the id.
Diffstat (limited to 'templates/timeline.inc.php')
-rw-r--r-- | templates/timeline.inc.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/timeline.inc.php b/templates/timeline.inc.php index 234ea83..a29e9dd 100644 --- a/templates/timeline.inc.php +++ b/templates/timeline.inc.php @@ -15,6 +15,10 @@ // get posts $posts = db_select_posts(NOW, $config['posts_per_page'], 'desc', $offset); + if(empty($posts)) { + header('Location: '.$config['url']); + die(); + } $title_suffix = ''; require(ROOT.DS.'snippets'.DS.'header.snippet.php'); |