cvs: pear /LiveUser/sql install.php
| From: | Lukas Smith | Date: | Wed, 08 Feb 2006 00:04:18 +0000 |
| Subject: | cvs: pear /LiveUser/sql install.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38041@lists.php.net to get a copy of this message | ||
lsmith Wed Feb 8 00:04:18 2006 UTC
Modified files:
/pear/LiveUser/sql install.php
Log:
- added example for dumping SQL to a file
http://cvs.php.net/viewcvs.cgi/pear/LiveUser/sql/install.php?r1=1.38&r2=1.39&diff_format=u
Index: pear/LiveUser/sql/install.php
diff -u pear/LiveUser/sql/install.php:1.38 pear/LiveUser/sql/install.php:1.39
--- pear/LiveUser/sql/install.php:1.38 Fri Dec 9 20:56:59 2005
+++ pear/LiveUser/sql/install.php Wed Feb 8 00:04:18 2006
@@ -35,7 +35,7 @@
* @author Lukas Smith <smith@pooteeweet.org>
* @copyright 2002-2005 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
- * @version CVS: $Id: install.php,v 1.38 2005/12/09 20:56:59 lsmith Exp $
+ * @version CVS: $Id: install.php,v 1.39 2006/02/08 00:04:18 lsmith Exp $
* @link http://pear.php.net/LiveUser
*/
@@ -103,11 +103,24 @@
)
);
+@unlink('dump.sql');
+function dump_to_file(&$db, $scope, $message, $is_manip)
+{
+ if ($is_manip) {
+ $fp = fopen('dump.sql', 'a');
+ fwrite($fp, $message."\n");
+ fclose($fp);
+ }
+}
+
// customize MDB2_SCHEMA configuration options as needed
$options = array(
'debug' => true,
'log_line_break' => '<br>',
'portability' => (MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL),
+// to dump the SQL to a file uncommented the following line
+// and set the disable_query parameter in the installSchema calls
+# 'debug_handler' => 'dump_to_file',
);
// create instance of the auth container
@@ -164,7 +177,7 @@
* @category authentication
* @package LiveUser
* @author Lukas Smith <smith@pooteeweet.org>
- * @version $Id: install.php,v 1.38 2005/12/09 20:56:59 lsmith Exp $
+ * @version $Id: install.php,v 1.39 2006/02/08 00:04:18 lsmith Exp $
* @copyright 2002-2005 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
* @version Release: @package_version@