diff options
author | Serge Martin <edb@sigluy.net> | 2011-08-07 21:06:53 +0200 |
---|---|---|
committer | Serge Martin <edb@sigluy.net> | 2011-08-07 21:06:53 +0200 |
commit | 3e8ae8636cad91877c727c7b1ea77436816e7c3d (patch) | |
tree | 297fb9c5ab82a27d042bad7bc304f020f957a170 /core/templates/installation.php | |
parent | acf7916e71f1e290aa12eb259d92aa8ab2ffcf23 (diff) | |
download | nextcloud-server-3e8ae8636cad91877c727c7b1ea77436816e7c3d.tar.gz nextcloud-server-3e8ae8636cad91877c727c7b1ea77436816e7c3d.zip |
Add postgresql support
REVIEW: 102101
Diffstat (limited to 'core/templates/installation.php')
-rw-r--r-- | core/templates/installation.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/core/templates/installation.php b/core/templates/installation.php index 8b36d14bbf5..e2392778bed 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -39,7 +39,7 @@ <legend><?php echo $l->t( 'Configure the database.' ); ?></legend> <?php if($_['hasSQLite']): ?> <input type='hidden' id='hasSQLite' value='true'/> - <?php if(!$_['hasMySQL']): ?> + <?php if(!$_['hasMySQL'] and !$_['hasPostgreSQL']): ?> <p><?php echo $l->t( 'SQLite will be used for the database. You have nothing to do.' ); ?></p> <input type="hidden" id="dbtype" name="dbtype" value="sqlite" /> <?php else: ?> @@ -49,11 +49,11 @@ <?php if($_['hasMySQL']): ?> <input type='hidden' id='hasMySQL' value='true'/> - <?php if(!$_['hasSQLite']): ?> + <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL']): ?> <p><?php echo $l->t( 'MySQL will be used for the database.' ); ?></p> <input type="hidden" id="dbtype" name="dbtype" value="mysql" /> <?php else: ?> - <p><label class="mysql" for="mysql">MySQL </label><input type="radio" name="dbtype" value='mysql' id="mysql" <?php OC_Helper::init_radio('dbtype', 'mysql', 'sqlite'); ?>/></p> + <p><label class="mysql" for="mysql">MySQL </label><input type="radio" name="dbtype" value='mysql' id="mysql" <?php OC_Helper::init_radio('dbtype','pgsql', 'mysql', 'sqlite'); ?>/></p> <?php endif; ?> <div id="use_mysql"> <p><label for="dbuser"><?php echo $l->t( 'MySQL username:' ); ?></label><input type="text" name="dbuser" id="dbuser" value="<?php print OC_Helper::init_var('dbuser'); ?>" /></p> @@ -64,6 +64,24 @@ </div> <?php endif; ?> + + <?php if($_['hasPostgreSQL']): ?> + <input type='hidden' id='hasPostgreSQL' value='true'/> + <?php if(!$_['hasSQLite'] and !$_['hasSQLite']): ?> + <p><?php echo $l->t( 'PostgreSQL will be used for the database.' ); ?></p> + <input type="hidden" id="dbtype" name="dbtype" value="pgsql" /> + <?php else: ?> + <p><label class="pgsql" for="pgsql">PostgreSQL </label><input type="radio" name="dbtype" value='pgsql' id="pgsql" <?php OC_Helper::init_radio('dbtype','pgsql', 'mysql', 'sqlite'); ?>/></p> + <?php endif; ?> + <div id="use_postgresql"> + <p><label for="pg_dbuser"><?php echo $l->t( 'PostgreSQL username:' ); ?></label><input type="text" name="pg_dbuser" id="pg_dbuser" value="<?php print OC_Helper::init_var('dbuser'); ?>" /></p> + <p><label for="pg_dbpass"><?php echo $l->t( 'PostgreSQL password:' ); ?></label><input type="password" name="pg_dbpass" id="pg_dbpass" value="<?php print OC_Helper::init_var('dbpass'); ?>" /></p> + <p><label for="pg_dbname"><?php echo $l->t( 'Database name:' ); ?></label><input type="text" name="pg_dbname" id="pg_dbname" value="<?php print OC_Helper::init_var('dbname'); ?>" /></p> + <p><label for="pg_dbhost"><?php echo $l->t( 'Host:' ); ?></label><input type="text" name="pg_dbhost" id="pg_dbhost" value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" /></p> + <p><label for="pg_dbtableprefix"><?php echo $l->t( 'Table prefix:' ); ?></label><input type="text" name="pg_dbtableprefix" id="pg_dbtableprefix" value="<?php print OC_Helper::init_var('dbtableprefix', 'oc_'); ?>" /></p> + + </div> + <?php endif; ?> </fieldset> <p class="submit"><input type="submit" value="<?php echo $l->t( 'Finish setup' ); ?>" /></p> |