aboutsummaryrefslogtreecommitdiffhomepage
path: root/install
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-05-29 18:54:06 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-05-29 18:54:06 +0200
commita9f5e572dde4f986a498d2fbe92a38a1b22f9595 (patch)
tree80b5bfc9836ae92cc4929a4d72ae0b2730e568bc /install
parent96834a47b09985e1c82b82857fc108f20e8b8f2b (diff)
parent8038b38802769031e050c753fc0a388a2276629e (diff)
downloadwallabag-a9f5e572dde4f986a498d2fbe92a38a1b22f9595.tar.gz
wallabag-a9f5e572dde4f986a498d2fbe92a38a1b22f9595.tar.zst
wallabag-a9f5e572dde4f986a498d2fbe92a38a1b22f9595.zip
Merge pull request #712 from wallabag/dev1.7.0
1.7, call me "Premium version"
Diffstat (limited to 'install')
-rwxr-xr-x[-rw-r--r--]install/index.php8
-rw-r--r--install/postgres.sql14
2 files changed, 11 insertions, 11 deletions
diff --git a/install/index.php b/install/index.php
index e02952e0..e702891b 100644..100755
--- a/install/index.php
+++ b/install/index.php
@@ -53,7 +53,7 @@ else if (isset($_POST['install'])) {
53 else { 53 else {
54 $continue = true; 54 $continue = true;
55 // Create config.inc.php 55 // Create config.inc.php
56 if (!copy('inc/poche/config.inc.php.new', 'inc/poche/config.inc.php')) { 56 if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) {
57 $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.'; 57 $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.';
58 $continue = false; 58 $continue = false;
59 } 59 }
@@ -101,7 +101,7 @@ else if (isset($_POST['install'])) {
101 101
102 $sql_structure = file_get_contents('install/mysql.sql'); 102 $sql_structure = file_get_contents('install/mysql.sql');
103 } 103 }
104 else if ($_POST['db_engine'] == 'postgresql') { 104 else if ($_POST['db_engine'] == 'postgres') {
105 $db_path = 'pgsql:host=' . $_POST['pg_server'] . ';dbname=' . $_POST['pg_database']; 105 $db_path = 'pgsql:host=' . $_POST['pg_server'] . ';dbname=' . $_POST['pg_database'];
106 $content = str_replace("define ('STORAGE_SERVER', 'localhost');", "define ('STORAGE_SERVER', '".$_POST['pg_server']."');", $content); 106 $content = str_replace("define ('STORAGE_SERVER', 'localhost');", "define ('STORAGE_SERVER', '".$_POST['pg_server']."');", $content);
107 $content = str_replace("define ('STORAGE_DB', 'poche');", "define ('STORAGE_DB', '".$_POST['pg_database']."');", $content); 107 $content = str_replace("define ('STORAGE_DB', 'poche');", "define ('STORAGE_DB', '".$_POST['pg_database']."');", $content);
@@ -262,7 +262,7 @@ php composer.phar install</code></pre></li>
262 </ul> 262 </ul>
263 </li> 263 </li>
264 <li> 264 <li>
265 <label for="postgresql">PostgreSQL</label> <input name="db_engine" type="radio" id="postgresql" value="postgresql" /> 265 <label for="postgres">PostgreSQL</label> <input name="db_engine" type="radio" id="postgres" value="postgres" />
266 <ul id="pg_infos"> 266 <ul id="pg_infos">
267 <li><label for="pg_server">Server</label> <input type="text" placeholder="localhost" id="pg_server" name="pg_server" /></li> 267 <li><label for="pg_server">Server</label> <input type="text" placeholder="localhost" id="pg_server" name="pg_server" /></li>
268 <li><label for="pg_database">Database</label> <input type="text" placeholder="wallabag" id="pg_database" name="pg_database" /></li> 268 <li><label for="pg_database">Database</label> <input type="text" placeholder="wallabag" id="pg_database" name="pg_database" /></li>
@@ -316,7 +316,7 @@ php composer.phar install</code></pre></li>
316 $("#install_button").show(); 316 $("#install_button").show();
317 } 317 }
318 else { 318 else {
319 if ( $("#postgresql").prop('checked')) { 319 if ( $("#postgres").prop('checked')) {
320 $("#mysql_infos").hide(); 320 $("#mysql_infos").hide();
321 $("#pg_infos").show(); 321 $("#pg_infos").show();
322 $("#pdo_sqlite").hide(); 322 $("#pdo_sqlite").hide();
diff --git a/install/postgres.sql b/install/postgres.sql
index fe8f559c..1d73dfcb 100644
--- a/install/postgres.sql
+++ b/install/postgres.sql
@@ -1,10 +1,10 @@
1CREATE TABLE config ( 1CREATE TABLE IF NOT EXISTS config (
2 id bigserial primary key, 2 id bigserial primary key,
3 name varchar(255) NOT NULL, 3 name varchar(255) NOT NULL,
4 value varchar(255) NOT NULL 4 value varchar(255) NOT NULL
5); 5);
6 6
7CREATE TABLE entries ( 7CREATE TABLE IF NOT EXISTS entries (
8 id bigserial primary key, 8 id bigserial primary key,
9 title varchar(255) NOT NULL, 9 title varchar(255) NOT NULL,
10 url varchar(255) NOT NULL, 10 url varchar(255) NOT NULL,
@@ -14,7 +14,7 @@ CREATE TABLE entries (
14 user_id integer NOT NULL 14 user_id integer NOT NULL
15); 15);
16 16
17CREATE TABLE users ( 17CREATE TABLE IF NOT EXISTS users (
18 id bigserial primary key, 18 id bigserial primary key,
19 username varchar(255) NOT NULL, 19 username varchar(255) NOT NULL,
20 password varchar(255) NOT NULL, 20 password varchar(255) NOT NULL,
@@ -22,20 +22,20 @@ CREATE TABLE users (
22 email varchar(255) NOT NULL 22 email varchar(255) NOT NULL
23); 23);
24 24
25CREATE TABLE users_config ( 25CREATE TABLE IF NOT EXISTS users_config (
26 id bigserial primary key, 26 id bigserial primary key,
27 user_id integer NOT NULL, 27 user_id integer NOT NULL,
28 name varchar(255) NOT NULL, 28 name varchar(255) NOT NULL,
29 value varchar(255) NOT NULL 29 value varchar(255) NOT NULL
30); 30);
31 31
32CREATE TABLE tags ( 32CREATE TABLE IF NOT EXISTS tags (
33 id bigserial primary key, 33 id bigserial primary key,
34 value varchar(255) NOT NULL 34 value varchar(255) NOT NULL
35); 35);
36 36
37CREATE TABLE tags_entries ( 37CREATE TABLE IF NOT EXISTS tags_entries (
38 id bigserial primary key, 38 id bigserial primary key,
39 entry_id integer NOT NULL, 39 entry_id integer NOT NULL,
40 tag_id integer NOT NULL 40 tag_id integer NOT NULL
41) \ No newline at end of file 41)