From e6bb650881eeee1381672a6b2835239226bf8fff Mon Sep 17 00:00:00 2001 From: Victor De la Rocha Date: Thu, 8 Jan 2009 07:57:02 +0000 Subject: [PATCH] bug fixes --- admin/themes/admin/api.xml | 2 ++ api.php | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/themes/admin/api.xml b/admin/themes/admin/api.xml index 09065f0..1fd4826 100644 --- a/admin/themes/admin/api.xml +++ b/admin/themes/admin/api.xml @@ -9,6 +9,7 @@ {/block} + {if $totalRegistros} {block $posts as $post} {if $post.type=='post'} @@ -51,4 +52,5 @@ {/if} {/block} + {/if} diff --git a/api.php b/api.php index 96c5426..150e821 100644 --- a/api.php +++ b/api.php @@ -52,11 +52,15 @@ if(!defined('entry')) define('entry',true); if ($hasType) { $postType = type2Number($_GET["type"]); } - $rs = $tumble->getPosts($total, $start); + $rs = $tumble->getPosts($total, $start); + + $totalRegistros = $db->contarRegistros(); + $theme->set("totalRegistros",$totalRegistros); + if ($db->contarRegistros()>0) { $theme->set("start",$start); $theme->set("total",$total); - + while($post = mysql_fetch_assoc($rs)){ $post['desc'] = util::trimString($post["description"]); $strEnd = ($conf->urlFriendly) ? "/" : "";