summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTobias Ramforth <tobias@ramforth.com>2013-02-08 00:00:51 +0100
committerTobias Ramforth <tobias@ramforth.com>2013-02-08 00:00:51 +0100
commitd577f790c8cbcf4f8dce74f9991e4bd62e21f949 (patch)
tree3180f4061034082c6cd5018cc054ed8b5eb2dcec /core
parentf2b5bc8ab8fadaee3db3a03e6a4748fdb28a01b1 (diff)
downloadnextcloud-server-d577f790c8cbcf4f8dce74f9991e4bd62e21f949.tar.gz
nextcloud-server-d577f790c8cbcf4f8dce74f9991e4bd62e21f949.zip
Added MS SQL Server support
Diffstat (limited to 'core')
-rw-r--r--core/js/setup.js7
-rw-r--r--core/setup.php2
-rw-r--r--core/templates/installation.php20
3 files changed, 25 insertions, 4 deletions
diff --git a/core/js/setup.js b/core/js/setup.js
index 9aded6591ca..fb6e7c5097c 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -5,6 +5,7 @@ $(document).ready(function() {
mysql:!!$('#hasMySQL').val(),
postgresql:!!$('#hasPostgreSQL').val(),
oracle:!!$('#hasOracle').val(),
+ mssql:!!$('#hasMSSQL').val()
};
$('#selectDbType').buttonset();
@@ -41,6 +42,12 @@ $(document).ready(function() {
$('#dbhost').show(250);
$('#dbhostlabel').show(250);
});
+
+ $('#mssql').click(function() {
+ $('#use_other_db').slideDown(250);
+ $('#dbhost').show(250);
+ $('#dbhostlabel').show(250);
+ });
$('input[checked]').trigger('click');
diff --git a/core/setup.php b/core/setup.php
index 66b8cf378bd..0da9b35a35a 100644
--- a/core/setup.php
+++ b/core/setup.php
@@ -16,6 +16,7 @@ $hasSQLite = class_exists('SQLite3');
$hasMySQL = is_callable('mysql_connect');
$hasPostgreSQL = is_callable('pg_connect');
$hasOracle = is_callable('oci_connect');
+$hasMSSQL = is_callable('sqlsrv_connect');
$datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data');
// Protect data directory here, so we can test if the protection is working
@@ -26,6 +27,7 @@ $opts = array(
'hasMySQL' => $hasMySQL,
'hasPostgreSQL' => $hasPostgreSQL,
'hasOracle' => $hasOracle,
+ 'hasMSSQLServer' => $hasMSSQL,
'directory' => $datadir,
'secureRNG' => OC_Util::secureRNG_available(),
'htaccessWorking' => OC_Util::ishtaccessworking(),
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 03c580c9b0b..6a6370785d3 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -2,6 +2,7 @@
<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'>
<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'>
<input type='hidden' id='hasOracle' value='<?php echo $_['hasOracle'] ?>'>
+<input type='hidden' id='hasMSSQL' value='<?php echo $_['hasMSSQL'] ?>'>
<form action="index.php" method="post">
<input type="hidden" name="install" value="true" />
<?php if(count($_['errors']) > 0): ?>
@@ -55,7 +56,7 @@
</fieldset>
<fieldset id='databaseField'>
- <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
+ <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'] or $_['hasMSSQL']) $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
<legend><?php echo $l->t( 'Configure the database' ); ?></legend>
<div id="selectDbType">
<?php if($_['hasSQLite']): ?>
@@ -71,7 +72,7 @@
<?php if($_['hasMySQL']): ?>
<input type='hidden' id='hasMySQL' value='true'/>
- <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL'] and !$_['hasOracle']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasPostgreSQL'] and !$_['hasOracle'] and !$_['hasMSSQL']): ?>
<p>MySQL <?php echo $l->t( 'will be used' ); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="mysql" />
<?php else: ?>
@@ -81,7 +82,7 @@
<?php endif; ?>
<?php if($_['hasPostgreSQL']): ?>
- <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasOracle']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasOracle'] and !$_['hasMSSQL']): ?>
<p>PostgreSQL <?php echo $l->t( 'will be used' ); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="pgsql" />
<?php else: ?>
@@ -91,7 +92,7 @@
<?php endif; ?>
<?php if($_['hasOracle']): ?>
- <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL']): ?>
+ <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasMSSQL']): ?>
<p>Oracle <?php echo $l->t( 'will be used' ); ?>.</p>
<input type="hidden" id="dbtype" name="dbtype" value="oci" />
<?php else: ?>
@@ -99,6 +100,17 @@
<input type="radio" name="dbtype" value='oci' id="oci" <?php OC_Helper::init_radio('dbtype', 'oci', 'sqlite'); ?>/>
<?php endif; ?>
<?php endif; ?>
+
+ <?php if($_['hasMSSQL']): ?>
+ <input type='hidden' id='hasMSSQL' value='true'/>
+ <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasOracle']): ?>
+ <p>MS SQL <?php echo $l->t( 'will be used' ); ?>.</p>
+ <input type="hidden" id="dbtype" name="dbtype" value="mssql" />
+ <?php else: ?>
+ <label class="mssql" for="mssql">MS SQL</label>
+ <input type="radio" name="dbtype" value='mssql' id="mssql" <?php OC_Helper::init_radio('dbtype', 'mssql', 'sqlite'); ?>/>
+ <?php endif; ?>
+ <?php endif; ?>
</div>
<?php if($hasOtherDB): ?>