Browse Source

bug fixes

Victor De la Rocha 15 years ago
parent
commit
e6bb650881
2 changed files with 8 additions and 2 deletions
  1. 2 0
      admin/themes/admin/api.xml
  2. 6 2
      api.php

+ 2 - 0
admin/themes/admin/api.xml View File

@@ -9,6 +9,7 @@
9 9
 			{/block}
10 10
 			</feeds>
11 11
 		</tumblelog>	
12
+		{if $totalRegistros}
12 13
 		<posts start="{start}" total="{total}">
13 14
 		{block $posts as $post}
14 15
 			{if $post.type=='post'}
@@ -51,4 +52,5 @@
51 52
 			{/if}
52 53
 		{/block}
53 54
 		</posts>
55
+		{/if}
54 56
 	</gelato>

+ 6 - 2
api.php View File

@@ -52,11 +52,15 @@ if(!defined('entry')) define('entry',true);
52 52
 		if ($hasType) {
53 53
 			$postType = type2Number($_GET["type"]);
54 54
 		}
55
-		$rs = $tumble->getPosts($total, $start);
55
+		$rs = $tumble->getPosts($total, $start);
56
+
57
+		$totalRegistros = $db->contarRegistros();
58
+		$theme->set("totalRegistros",$totalRegistros);
59
+
56 60
 		if ($db->contarRegistros()>0) {
57 61
 			$theme->set("start",$start);
58 62
 			$theme->set("total",$total);
59
-
63
+
60 64
 			while($post = mysql_fetch_assoc($rs)){
61 65
 				$post['desc'] = util::trimString($post["description"]);				
62 66
 				$strEnd = ($conf->urlFriendly) ? "/" : "";