Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-29 20:39:54 +0400
committerRobin Appelman <icewind@owncloud.com>2012-01-29 21:00:55 +0400
commit039bbfde2d2e1efc90fa9828811566ea1f328722 (patch)
tree2856577cbebb13b28c11fef7b0a25a69ffd767c8
parent30f1de71a694bb526b08e4fb6a0333659bd2030e (diff)
automatically show advanced options when no sqlite is availablev3.0
-rw-r--r--core/js/setup.js12
-rw-r--r--core/templates/installation.php3
2 files changed, 15 insertions, 0 deletions
diff --git a/core/js/setup.js b/core/js/setup.js
index 94097785e42..6e056cc90d1 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -1,4 +1,11 @@
+var dbtypes
$(document).ready(function() {
+ dbtypes={
+ sqlite:!!$('#hasSQLite').val(),
+ mysql:!!$('#hasMySQL').val(),
+ postgresql:!!$('#hasPostgreSQL').val(),
+ }
+
$('#selectDbType').buttonset();
$('#datadirContent').hide(250);
$('#databaseField').hide(250);
@@ -60,4 +67,9 @@ $(document).ready(function() {
form.submit();
return false;
});
+
+ if(!dbtypes.sqlite){
+ $('#showAdvanced').click();
+ $('input[type="radio"]').first().click();
+ }
});
diff --git a/core/templates/installation.php b/core/templates/installation.php
index f1cde6b3904..4558f97bc08 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -1,3 +1,6 @@
+<input type='hidden' id='hasMySQL' value='<?php echo $_['hasMySQL'] ?>'></input>
+<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'></input>
+<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'></input>
<form action="index.php" method="post">
<input type="hidden" name="install" value="true" />