rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit 72e7f22e8f39f5c44983d124490e39092239e214
parent 641058d7119250c95360c28c4f95fdfe196585cb
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun, 23 Nov 2014 15:11:03 +0100

another try to fix it

Diffstat:
Mcore/backend/blog/posts.php | 2++
Mthemes/jumbotron/index.php | 7++++++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php @@ -41,6 +41,8 @@ $resultat->close(); } else { //If no data in Database give error + global $error; + $error = "1"; echo "Nothing to read from Database!"; $post_id = "Database error!"; $post_title = "Database error!"; diff --git a/themes/jumbotron/index.php b/themes/jumbotron/index.php @@ -6,6 +6,7 @@ ########################## # include required files # ########################## + $error = "0"; $empty = empty($_GET["id"]); if (!$empty){ $id = $_GET["id"]; @@ -84,15 +85,19 @@ <?php $x = 1; if ($empty){ + if (!$error = "1"){ while ($x < 10){ $read = "1"; $id = $x; echo "<a href='index.php?id=$x' rel='bookmark'> $post_title </a>"; $x = $x+1; } + }else{ + echo "<a href='index.php?id=$id' rel='bookmark'> $post_title </a>"; + } }else{ echo "<a href='index.php?id=$id' rel='bookmark'> $post_title </a>"; - } + } ?> </h1> <div>