# HG changeset patch # User rejo # Date 1182807149 0 # Node ID 5d63f1e71d6e46f96ec9a4a81b4198dc949f9044 # Parent 576034a80ea83b79048ca4106e5bb42fb022296a [feladat @ 73] All owners (not sub-owners though) of the zone are now shown when listing a zone. Added a new function to retrieve owners of zone by id without fetching all other zone details, which should improve perfomance. Both fixes by Peter Beernink. diff -r 576034a80ea8 -r 5d63f1e71d6e credits.php --- a/credits.php Mon Jun 25 20:57:22 2007 +0000 +++ b/credits.php Mon Jun 25 21:32:29 2007 +0000 @@ -6,7 +6,7 @@

This version is an adaption of the original Poweradmin, version 1.2.7-patched. Poweradmin was written by Sjeemz and Trancer. The Poweradmin code includes patches by Wim Mostrey and Dennis Roos. This version has been patched by Rejo Zenger 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.

-

Thanks to Koert Buijzer (ideas on sql performance improvements) and Balazs Petrikovics (for bugreports and patches).

+

Thanks to Koert Buijzer, Peter Beernink and Balazs Petrikovics for bug reports, patches and good ideas.

disconnect(); } - $svn_rev = '$LastChangedRevision: 71 $ $Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $ $Author: rejo $'; + $svn_rev = '$LastChangedRevision: 73 $ $LastChangedDate: 2007-06-25 23:32:29 +0200 (Mon, 25 Jun 2007) $ $Author: rejo $'; $svn_rev = preg_split("/[\s,]+/", $svn_rev); $revision = "revision $svn_rev[1] (commited at $svn_rev[4] by $svn_rev[13])"; diff -r 576034a80ea8 -r 5d63f1e71d6e inc/users.inc.php --- a/inc/users.inc.php Mon Jun 25 20:57:22 2007 +0000 +++ b/inc/users.inc.php Mon Jun 25 21:32:29 2007 +0000 @@ -364,4 +364,32 @@ } error(ERR_INV_ARG); } + +/** + * get_owners_from_domainid + * + * @todo also fetch the subowners + * @param $id integer the id of the domain + * @return String the list of owners for this domain + */ +function get_owners_from_domainid($id) { + + global $db; + if (is_numeric($id)) + { + $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 { + $names = array(); + while ($r = $result->fetchRow()) { + $names[] = $r['fullname']; + } + return implode(', ', $names); + } + } + error(ERR_INV_ARG); +} + ?> diff -r 576034a80ea8 -r 5d63f1e71d6e list_zones.php --- a/list_zones.php Mon Jun 25 20:57:22 2007 +0000 +++ b/list_zones.php Mon Jun 25 21:32:29 2007 +0000 @@ -77,9 +77,9 @@ } ?> - + - +