# HG changeset patch # User rejo # Date 1182808533 0 # Node ID 782f142d096d07804f47a24faad6c4d61e64076c # Parent 5d63f1e71d6e46f96ec9a4a81b4198dc949f9044 [feladat @ 74] Added missing record_owners SQL table creation during install. Fix by John Morris. diff -r 5d63f1e71d6e -r 782f142d096d credits.php --- a/credits.php Mon Jun 25 21:32:29 2007 +0000 +++ b/credits.php Mon Jun 25 21:55:33 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, Peter Beernink and Balazs Petrikovics for bug reports, patches and good ideas.

+

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

trancer nl> | -// | Sjeemz sjeemz nl> | -// | Add-ons: Wim Mostrey mostrey be> | -// +--------------------------------------------------------------------+ - -// Filename: install.php -// Description: installs your PowerAdmin -// -// $Id: install.php,v 1.12 2003/01/07 23:29:24 lyon Exp $ -// - // addslashes to vars if magic_quotes_gpc is off function slash_input_data(&$data) { @@ -97,6 +76,12 @@ comment text, PRIMARY KEY (id) ) TYPE=InnoDB"; + $sqlrecowns = "CREATE TABLE record_owners ( + id int(11) NOT NULL auto_increment, + user_id int(11) NOT NULL default '0', + record_id int(11) NOT NULL default '0', + PRIMARY KEY (id) + ) TYPE=InnoDB"; } // PGSQL Is trivial still, the relations are different. @@ -118,6 +103,11 @@ owner smallint NOT NULL, comment text NULL )"; + $sqlrecowns = "CREATE TABLE record_owners ( + id SERIAL PRIMARY KEY, + user_id smallint NOT NULL, + record_id smallint NOT NULL + )"; } if(!empty($_POST['login']) && !empty($_POST['password']) && !empty($_POST['fullname']) && !empty($_POST['email'])) @@ -141,7 +131,13 @@ { error("Can not create zones table in $dbdatabase"); } + $reszones = $db->query($sqlrecowns); + if($db->isError($reszones)) + { + error("Can not create record_owners table in $dbdatabase"); + } + $sqlinsert = "INSERT INTO users (username, password, fullname, email, description, level, active)