SOURCES: poweradmin-bugs.patch (NEW) this patch allow to run power...

luzik luzik at pld-linux.org
Fri Jun 8 07:44:59 CEST 2007


Author: luzik                        Date: Fri Jun  8 05:44:59 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
this patch allow to run poweradmin with php5 and add missing table creation

---- Files affected:
SOURCES:
   poweradmin-bugs.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/poweradmin-bugs.patch
diff -u /dev/null SOURCES/poweradmin-bugs.patch:1.1
--- /dev/null	Fri Jun  8 07:44:59 2007
+++ SOURCES/poweradmin-bugs.patch	Fri Jun  8 07:44:54 2007
@@ -0,0 +1,55 @@
+--- poweradmin/inc/database.inc.php.fix	2007-06-07 16:57:17.933458301 +0200
++++ poweradmin/inc/database.inc.php	2007-06-07 16:57:30.292608888 +0200
+@@ -21,7 +21,7 @@
+ // $Id$
+ //
+ 
+-require_once("dal.inc.php");
++require_once("DB.php");
+ 
+ function dbError($msg)
+ {
+--- poweradmin/install.php.orig.fix	2007-06-07 16:58:54.160178192 +0200
++++ poweradmin/install.php.orig	2007-06-07 17:06:30.072177733 +0200
+@@ -96,7 +96,13 @@ if(isset($_POST["submit"]))
+ 				  owner int(11) NOT NULL default '0',
+ 				  comment text,
+ 				  PRIMARY KEY  (id)
+-				) TYPE=InnoDB";
++				  ) TYPE=InnoDB";
++		$sqlrecord_owners = "CREATE TABLE `record_owners` (
++				  `id` int(10) unsigned 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 +124,11 @@ if(isset($_POST["submit"]))
+ 				owner smallint NOT NULL,
+ 				comment text NULL
+ 				)";
++		$sqlrecord_owners = "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']))
+@@ -142,6 +153,14 @@ if(isset($_POST["submit"]))
+ 			error("Can not create zones table in $dbdatabase");
+ 		}
+ 
++		$resrecord_owners = $db->query($sqlrecord_owners);
++
++		if($db->isError($reszones))
++		{
++			error("Can not create zones table in $dbdatabase");
++		}
++
++
+ 		$id = $db->nextID('users');
+ 
+ 		/* TODO next version: fix the strip_slashes. might give trouble upgrading :/ -Lyon */
================================================================


More information about the pld-cvs-commit mailing list