alecpl
2008-10-08 acff900c5a3a7c89faaf1141eff706ec221a4dd3
bin/dumpschema.php
@@ -1,6 +1,25 @@
<?php
/*
define('INSTALL_PATH', realpath('./../') . '/');
 +-----------------------------------------------------------------------+
 | bin/dumpschema.php                                                    |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
 |   Dumps database schema in XML format using MDB2_Schema               |
 |                                                                       |
 +-----------------------------------------------------------------------+
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
 $Id$
*/
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
require INSTALL_PATH.'program/include/iniset.php';
/** callback function for schema dump **/
@@ -25,12 +44,15 @@
   'debug' => false,
   'quote_identifier' => true,
   'force_defaults' => false,
   'portability' => false
   'portability' => false,
   'disable_smart_seqname' => true,
   'seqname_format' => '%s'
);
$schema =& MDB2_Schema::factory($config->get('db_dsnw'), $options);
$schema->db->supported['transactions'] = false;
// send as text/xml when opened in browser
if ($_SERVER['REMOTE_ADDR'])
   header('Content-Type: text/xml');
@@ -44,7 +66,7 @@
      // 'output_mode' => 'file',
      'output' => 'print_schema',
   );
   $definition = $schema->getDefinitionFromDatabase();
   if (PEAR::isError($definition)) {
      $error = $definition->getMessage() . ' ' . $definition->getUserInfo();