[feladat @ 62]
authorrejo
Tue, 05 Jun 2007 22:40:47 +0000
changeset 15 305cee3b388d
parent 14 2093cbe1133e
child 16 79b09e1e2985
[feladat @ 62] Bugfix. In list_zones.php with no domains created, get_domains will return -1, count() will not be 0, as all_doms contains one element. Similar problem in existed in list_supermasters.php.
list_supermasters.php
list_zones.php
--- a/list_supermasters.php	Mon Jun 04 19:04:55 2007 +0000
+++ b/list_supermasters.php	Tue Jun 05 22:40:47 2007 +0000
@@ -14,16 +14,7 @@
 {
 
 	$supermasters = get_supermasters(0);
-	$num_supermasters = count($supermasters);
-	if ($supermasters < 0)
-	{
-		$num_supermasters = "0";
-	}
-	else
-	{
-		$num_supermasters = count($supermasters);
-	}
-
+	$num_supermasters = ($supermasters == -1) ? 0 : count($supermasters);
 	?>
 
 	   <h3><? printf(_('List all %s supermasters'), $num_supermasters); ?></h3>
--- a/list_zones.php	Mon Jun 04 19:04:55 2007 +0000
+++ b/list_zones.php	Tue Jun 05 22:40:47 2007 +0000
@@ -4,7 +4,7 @@
 include_once("inc/header.inc.php");
 
 $all_doms = get_domains(0);
-$num_all_domains = count($all_doms);
+$num_all_domains = ($all_doms == -1) ? 0 : count($all_doms);
 $doms = get_domains(0,LETTERSTART);
 show_pages(count($doms),ROWAMOUNT);
 ?>