diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-01-30 09:12:57 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-01-30 09:12:57 +0100 |
commit | 8c893b79d230cc844226bdf3b1de95cd5a99ecb2 (patch) | |
tree | f8e6e1df519c9b85bd16bdc31f1ae6a3b16ce6e7 /bin | |
parent | 1978ae97a5e0feb8d205c5fcbaa2cc16ce3ffc28 (diff) |
Branching off for release 1.0
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dumpschema.sh | 97 | ||||
-rwxr-xr-x | bin/makedoc.sh | 26 |
2 files changed, 0 insertions, 123 deletions
diff --git a/bin/dumpschema.sh b/bin/dumpschema.sh deleted file mode 100755 index 6d5cde723..000000000 --- a/bin/dumpschema.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php -<?php -/* - +-----------------------------------------------------------------------+ - | bin/dumpschema.sh | - | | - | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | - | | - | Licensed under the GNU General Public License version 3 or | - | any later version with exceptions for skins & plugins. | - | See the README file for a full license statement. | - | | - | PURPOSE: | - | Dumps database schema in XML format using MDB2_Schema | - | | - +-----------------------------------------------------------------------+ - | Author: Thomas Bruederli <roundcube@gmail.com> | - +-----------------------------------------------------------------------+ -*/ - -define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' ); - -require INSTALL_PATH.'program/include/clisetup.php'; - -/** callback function for schema dump **/ -function print_schema($dump) -{ - foreach ((array)$dump as $part) - echo $dump . "\n"; -} - -$config = new rcube_config(); - -// don't allow public access if not in devel_mode -if (!$config->get('devel_mode') && $_SERVER['REMOTE_ADDR']) { - header("HTTP/1.0 401 Access denied"); - die("Access denied!"); -} - -$options = array( - 'use_transactions' => false, - 'log_line_break' => "\n", - 'idxname_format' => '%s', - 'debug' => false, - 'quote_identifier' => true, - 'force_defaults' => false, - 'portability' => false, -); - -$dsnw = $config->get('db_dsnw'); -$dsn_array = MDB2::parseDSN($dsnw); - -// set options for postgres databases -if ($dsn_array['phptype'] == 'pgsql') { - $options['disable_smart_seqname'] = true; - $options['seqname_format'] = '%s'; -} - -$schema =& MDB2_Schema::factory($dsnw, $options); -$schema->db->supported['transactions'] = false; - - -// send as text/xml when opened in browser -if ($_SERVER['REMOTE_ADDR']) - header('Content-Type: text/xml'); - - -if (PEAR::isError($schema)) { - $error = $schema->getMessage() . ' ' . $schema->getUserInfo(); -} -else { - $dump_config = array( - // 'output_mode' => 'file', - 'output' => 'print_schema', - ); - - $definition = $schema->getDefinitionFromDatabase(); - $definition['charset'] = 'utf8'; - - if (PEAR::isError($definition)) { - $error = $definition->getMessage() . ' ' . $definition->getUserInfo(); - } - else { - $operation = $schema->dumpDatabase($definition, $dump_config, MDB2_SCHEMA_DUMP_STRUCTURE); - if (PEAR::isError($operation)) { - $error = $operation->getMessage() . ' ' . $operation->getUserInfo(); - } - } -} - -$schema->disconnect(); - -if ($error && !$_SERVER['REMOTE_ADDR']) - fputs(STDERR, $error); - -?> diff --git a/bin/makedoc.sh b/bin/makedoc.sh deleted file mode 100755 index 2a34254cb..000000000 --- a/bin/makedoc.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -TITLE="Roundcube Webmail" -PACKAGES="Core" - -INSTALL_PATH="`dirname $0`/.." -PATH_PROJECT=$INSTALL_PATH/program/include -PATH_FRAMEWORK=$INSTALL_PATH/program/lib/Roundcube -PATH_DOCS=$INSTALL_PATH/doc/phpdoc -BIN_PHPDOC="`/usr/bin/which phpdoc`" - -if [ ! -x "$BIN_PHPDOC" ] -then - echo "phpdoc not found: $BIN_PHPDOC" - exit 1 -fi - -OUTPUTFORMAT=HTML -CONVERTER=frames -TEMPLATE=earthli -PRIVATE=off - -# make documentation -$BIN_PHPDOC -d $PATH_PROJECT,$PATH_FRAMEWORK -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \ --o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE - |