summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-25 12:50:32 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-25 12:50:32 -0800
commit6dd1d479dabbe69be971525034b2711497e34098 (patch)
tree3c99c2ba3192161eff1497558bef6a342a419369 /core
parenta533bb6dcd4a68927c21b63a83830d79384320a5 (diff)
parent9898ba4daf1acdead2ed5fa6024e779caafb353e (diff)
downloadnextcloud-server-6dd1d479dabbe69be971525034b2711497e34098.tar.gz
nextcloud-server-6dd1d479dabbe69be971525034b2711497e34098.zip
Merge pull request #1706 from owncloud/master-sqlserver
Microsoft SQL-Server support for ownCloud!
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 2656cac2f45..76812b29979 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 f16385466cb..77eed5376d6 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,
+ 'hasMSSQL' => $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 c48d2f764e7..aca9648d0bf 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): ?>
@@ -60,7 +61,7 @@
</fieldset>
<fieldset id='databaseField'>
- <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
+ <?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">
@@ -78,7 +79,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: ?>
@@ -89,7 +90,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: ?>
@@ -100,7 +101,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: ?>
@@ -109,6 +110,17 @@
<?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): ?>