Browse Source

bug fixes

Victor De la Rocha 16 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
 			{/block}
9
 			{/block}
10
 			</feeds>
10
 			</feeds>
11
 		</tumblelog>	
11
 		</tumblelog>	
12
+		{if $totalRegistros}
12
 		<posts start="{start}" total="{total}">
13
 		<posts start="{start}" total="{total}">
13
 		{block $posts as $post}
14
 		{block $posts as $post}
14
 			{if $post.type=='post'}
15
 			{if $post.type=='post'}
51
 			{/if}
52
 			{/if}
52
 		{/block}
53
 		{/block}
53
 		</posts>
54
 		</posts>
55
+		{/if}
54
 	</gelato>
56
 	</gelato>

+ 6 - 2
api.php View File

52
 		if ($hasType) {
52
 		if ($hasType) {
53
 			$postType = type2Number($_GET["type"]);
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
 		if ($db->contarRegistros()>0) {
60
 		if ($db->contarRegistros()>0) {
57
 			$theme->set("start",$start);
61
 			$theme->set("start",$start);
58
 			$theme->set("total",$total);
62
 			$theme->set("total",$total);
59
-
63
+
60
 			while($post = mysql_fetch_assoc($rs)){
64
 			while($post = mysql_fetch_assoc($rs)){
61
 				$post['desc'] = util::trimString($post["description"]);				
65
 				$post['desc'] = util::trimString($post["description"]);				
62
 				$strEnd = ($conf->urlFriendly) ? "/" : "";
66
 				$strEnd = ($conf->urlFriendly) ? "/" : "";