[feladat @ 83]
authorrejo
Mon, 02 Jul 2007 23:01:18 +0000
changeset 36 4ec5ab29f634
parent 35 5533c4fff98f
child 37 b785e54690ce
[feladat @ 83] Bugfix: the list_zones.php wasn't listing zones correctly if a zone didn't have an owner. Bugfix: the list_supermasters.php never listed more then one supermaster, even if there were more. Both bugs were reported by Jasper van Erven Dorens.
credits.php
inc/record.inc.php
inc/users.inc.php
list_zones.php
--- a/credits.php	Thu Jun 28 09:19:48 2007 +0000
+++ b/credits.php	Mon Jul 02 23:01:18 2007 +0000
@@ -6,7 +6,7 @@
 
     <p><a href="https://rejo.zenger.nl/poweradmin/">This version</a> is an adaption of the original <a href="http://www.poweradmin.org">Poweradmin</a>, version 1.2.7-patched. Poweradmin was written by <a href="http://sjeemz.nl/">Sjeemz</a> and <a href="http://www.trancer.nl/">Trancer</a>. The Poweradmin code includes patches by <a href="http://mostrey.be/">Wim Mostrey</a> and Dennis Roos. <a href="https://rejo.zenger.nl/poweradmin/">This version</a> has been patched by <a href="http://rejo.zenger.nl">Rejo Zenger</a> and includes many additional features like multi-language support, an update of the database abstraction layer, support for slave zones, support for supermasters, basic support for skins and a number of bug fixes.</p>
 
-    <p>Thanks to Peter Beernink, Koert Buijzer, John Morris and Balazs Petrikovics for bug reports, patches and good ideas.</p>
+    <p>Thanks to Peter Beernink, Koert Buijzer, Jasper van Erven Dorens, John Morris and Balazs Petrikovics for bug reports, patches and good ideas.</p>
 
 <?
 include_once("inc/footer.inc.php");
--- a/inc/record.inc.php	Thu Jun 28 09:19:48 2007 +0000
+++ b/inc/record.inc.php	Mon Jul 02 23:01:18 2007 +0000
@@ -1,18 +1,5 @@
 <?
 
-// +--------------------------------------------------------------------+
-// | PowerAdmin                                                         |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team                        |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal   |
-// | program PowerAdmin as found on http://poweradmin.sf.net            |
-// | The PowerAdmin program falls under the QPL License:                |
-// | http://www.trolltech.com/developer/licensing/qpl.html              |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl>       |
-// |          Sjeemz <sjeemz <AT> sjeemz <DOT> nl>                      |
-// +--------------------------------------------------------------------+
 
 // Filename: record.inc.php
 // Startdate: 26-10-2002
@@ -831,8 +818,8 @@
                         "ns_name"       => $r["nameserver"],
                         "account"       => $r["account"],
                         );
-                        return $ret;
                 }
+		return $ret;
         }
 }
 
--- a/inc/users.inc.php	Thu Jun 28 09:19:48 2007 +0000
+++ b/inc/users.inc.php	Mon Jul 02 23:01:18 2007 +0000
@@ -380,10 +380,13 @@
               $result = $db->query("SELECT users.id, users.fullname FROM users, zones WHERE zones.domain_id=$id AND zones.owner=users.id ORDER by fullname");
               if ($result->numRows() == 0)
               {
-                      error(ERR_USER_NOT_EXIST);
-              } else {
+		      return "";
+              } 
+	      else 
+	      {
                       $names = array();
-                      while ($r = $result->fetchRow()) {
+                      while ($r = $result->fetchRow()) 
+		      {
                               $names[] = $r['fullname'];
                       }
                       return implode(', ', $names);
--- a/list_zones.php	Thu Jun 28 09:19:48 2007 +0000
+++ b/list_zones.php	Mon Jul 02 23:01:18 2007 +0000
@@ -57,30 +57,39 @@
 		
     <tr>
 <?
-if (level(5))
-{
+		if (level(5))
+		{
 ?>
      <td>
       <a href="edit.php?id=<? echo $c["id"] ?>"><img src="images/edit.gif" title="<? echo _('Edit zone') . " " . $c['name']; ?>" alt="[ <? echo _('Edit zone') . " " . $c['name']; ?> ]"></a>
       <a href="delete_domain.php?id=<? echo $c["id"] ?>"><img src="images/delete.gif" title="<? print _('Delete zone') . " " . $c['name']; ?>" alt="[<? echo _('Delete zone') . " " . $c['name']; ?>]"></a>
      </td>
 <?
-}
-else
-{
+		}
+		else
+		{
 ?>
      <td class="n">
       &nbsp;
      </td>
 <?
-}
+		}
 ?>
      <td class="y"><? echo $c["name"] ?></td>
      <td class="y"><? echo strtolower(get_domain_type($c["id"])) ?></td>
      <td class="y"><? echo $c["numrec"] ?></td>
-     <td class="y"><? echo get_owners_from_domainid($c["id"]) ?></td>
-    </tr><?
-		print "\n";
+
+<?
+		$zone_owners = get_owners_from_domainid($c["id"]);
+		if ($zone_owners == "")
+		{
+			echo "<td class=\"n\"></td>";
+		}
+		else
+		{
+			print "<td class=\"y\">".$zone_owners."</td>";
+		}
+		print "<tr>\n";
 	}
 }