diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-03-14 00:22:11 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-03-14 00:22:11 +0100 |
commit | 7f8f8271e49a2834a87012ea838099c8b46cf63f (patch) | |
tree | 2c5394e49370d8e6890019de3889ab193b827aa8 /install | |
parent | f5618feb73343f0a120a809116c443630d70a87c (diff) | |
download | wallabag-7f8f8271e49a2834a87012ea838099c8b46cf63f.tar.gz wallabag-7f8f8271e49a2834a87012ea838099c8b46cf63f.tar.zst wallabag-7f8f8271e49a2834a87012ea838099c8b46cf63f.zip |
redo the whole lot of commits I've deleted while trying Gitlab/Framasoft mirroring
Diffstat (limited to 'install')
-rwxr-xr-x | install/index.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/install/index.php b/install/index.php index 69957283..7a6eaf3a 100755 --- a/install/index.php +++ b/install/index.php | |||
@@ -89,7 +89,7 @@ else if (isset($_POST['install'])) { | |||
89 | try { | 89 | try { |
90 | 90 | ||
91 | if ($_POST['db_engine'] == 'mysql') { | 91 | if ($_POST['db_engine'] == 'mysql') { |
92 | if ($_POST['mysql_server'] != "") {$server = $_POST['mysql_server'];} | 92 | if ($_POST['mysql_server'] != "") {$server = $_POST['mysql_server'];} // if server and database are filled |
93 | if ($_POST['mysql_database'] != "") {$database = $_POST['mysql_database'];} | 93 | if ($_POST['mysql_database'] != "") {$database = $_POST['mysql_database'];} |
94 | 94 | ||
95 | if (isset($_POST['mysql_utf8_mb4'])) { | 95 | if (isset($_POST['mysql_utf8_mb4'])) { |
@@ -100,6 +100,7 @@ else if (isset($_POST['install'])) { | |||
100 | )); | 100 | )); |
101 | $content = str_replace("define ('MYSQL_USE_UTF8MB4', FALSE);", "define ('MYSQL_USE_UTF8MB4', TRUE);", $content); | 101 | $content = str_replace("define ('MYSQL_USE_UTF8MB4', FALSE);", "define ('MYSQL_USE_UTF8MB4', TRUE);", $content); |
102 | } else { // regular UTF8 | 102 | } else { // regular UTF8 |
103 | $content = str_replace(" DEFAULT CHARSET=utf8mb4", "", $content); // replace the UTF8-MB4 occurences inside the mysql.sql file | ||
103 | $db_path = 'mysql:host=' . $server . ';dbname=' . $database; | 104 | $db_path = 'mysql:host=' . $server . ';dbname=' . $database; |
104 | $handle = new PDO($db_path, $_POST['mysql_user'], $_POST['mysql_password']); | 105 | $handle = new PDO($db_path, $_POST['mysql_user'], $_POST['mysql_password']); |
105 | } | 106 | } |
@@ -117,7 +118,6 @@ else if (isset($_POST['install'])) { | |||
117 | $moreQueries[] = "INSERT INTO `tags` (`id`, `value`) VALUES (1, 'opensource');"; | 118 | $moreQueries[] = "INSERT INTO `tags` (`id`, `value`) VALUES (1, 'opensource');"; |
118 | $moreQueries[] = "INSERT INTO `tags_entries` (`id`, `entry_id`, `tag_id`) VALUES (1, 2, 1);"; | 119 | $moreQueries[] = "INSERT INTO `tags_entries` (`id`, `entry_id`, `tag_id`) VALUES (1, 2, 1);"; |
119 | 120 | ||
120 | $sql_structure = file_get_contents('install/mysql.sql'); | ||
121 | } | 121 | } |
122 | else if ($_POST['db_engine'] == 'postgres') { | 122 | else if ($_POST['db_engine'] == 'postgres') { |
123 | if ($_POST['pg_server'] != "") {$server = $_POST['pg_server'];} | 123 | if ($_POST['pg_server'] != "") {$server = $_POST['pg_server'];} |
@@ -645,8 +645,8 @@ php composer.phar install</code></pre> | |||
645 | <p>All fields have to be filled.</p> | 645 | <p>All fields have to be filled.</p> |
646 | </div> | 646 | </div> |
647 | <ul id="mysql_infos"> | 647 | <ul id="mysql_infos"> |
648 | <li><label for="mysql_server">Server</label> <input type="text" placeholder="localhost" id="mysql_server" name="mysql_server" /></li> | 648 | <li><label for="mysql_server">Server</label> <input type="text" placeholder="eg : localhost" id="mysql_server" name="mysql_server" /></li> |
649 | <li><label for="mysql_database">Existing database</label> <input type="text" placeholder="wallabag" id="mysql_database" name="mysql_database" /></li> | 649 | <li><label for="mysql_database">Existing database</label> <input type="text" placeholder="eg : wallabag" id="mysql_database" name="mysql_database" /></li> |
650 | <li><label for="mysql_user">User</label> <input type="text" placeholder="user" id="mysql_user" name="mysql_user" /></li> | 650 | <li><label for="mysql_user">User</label> <input type="text" placeholder="user" id="mysql_user" name="mysql_user" /></li> |
651 | <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li> | 651 | <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li> |
652 | <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4"> | 652 | <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4"> |
@@ -666,8 +666,8 @@ php composer.phar install</code></pre> | |||
666 | <p>All fields have to be filled.</p> | 666 | <p>All fields have to be filled.</p> |
667 | </div> | 667 | </div> |
668 | <ul id="pg_infos"> | 668 | <ul id="pg_infos"> |
669 | <li><label for="pg_server">Server</label> <input type="text" placeholder="localhost" id="pg_server" name="pg_server" /></li> | 669 | <li><label for="pg_server">Server</label> <input type="text" placeholder="eg : localhost" id="pg_server" name="pg_server" /></li> |
670 | <li><label for="pg_database">Existing database</label> <input type="text" placeholder="wallabag" id="pg_database" name="pg_database" /></li> | 670 | <li><label for="pg_database">Existing database</label> <input type="text" placeholder="eg : wallabag" id="pg_database" name="pg_database" /></li> |
671 | <li><label for="pg_user">User</label> <input type="text" placeholder="user" id="pg_user" name="pg_user" /></li> | 671 | <li><label for="pg_user">User</label> <input type="text" placeholder="user" id="pg_user" name="pg_user" /></li> |
672 | <li><label for="pg_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="pg_password" name="pg_password" /></li> | 672 | <li><label for="pg_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="pg_password" name="pg_password" /></li> |
673 | </ul> | 673 | </ul> |