X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=install%2Findex.php;h=1ae782a2bc8656d68e4e61871e3e0e3075945f53;hb=657245dcbdbca323621952d2b6f9e991dd94fa03;hp=35c21fbe7fce18812bb46b8dd0f0f59a0d6cec7a;hpb=fecb62a3967eefda9880ce37e13693713385a093;p=github%2Fwallabag%2Fwallabag.git diff --git a/install/index.php b/install/index.php old mode 100644 new mode 100755 index 35c21fbe..1ae782a2 --- a/install/index.php +++ b/install/index.php @@ -1,4 +1,13 @@ + * @copyright 2013 + * @license http://opensource.org/licenses/MIT see COPYING file + */ + $errors = array(); $successes = array(); @@ -16,15 +25,15 @@ function delTree($dir) { } if (isset($_GET['clean'])) { - if (is_dir('install')){ - delTree('install'); - header('Location: index.php'); - } + if (is_dir('install')){ + delTree('install'); + header('Location: index.php'); + } } if (isset($_POST['download'])) { if (!file_put_contents("cache/vendor.zip", fopen("http://static.wallabag.org/files/vendor.zip", 'r'))) { - $errors[] = 'Impossible to download vendor.zip. Please download it manually<∕a> and unzip it in your wallabag folder.'; + $errors[] = 'Impossible to download vendor.zip. Please download it manually and unzip it in your wallabag folder.'; } else { if (extension_loaded('zip')) { @@ -53,7 +62,7 @@ else if (isset($_POST['install'])) { else { $continue = true; // Create config.inc.php - if (!copy('inc/poche/config.inc.php.new', 'inc/poche/config.inc.php')) { + if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) { $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.'; $continue = false; } @@ -85,7 +94,7 @@ else if (isset($_POST['install'])) { else { $db_path = 'sqlite:' . realpath('') . '/db/poche.sqlite'; $handle = new PDO($db_path); - $sql_structure = ""; + $sql_structure = ""; } } else { @@ -101,7 +110,7 @@ else if (isset($_POST['install'])) { $sql_structure = file_get_contents('install/mysql.sql'); } - else if ($_POST['db_engine'] == 'postgresql') { + else if ($_POST['db_engine'] == 'postgres') { $db_path = 'pgsql:host=' . $_POST['pg_server'] . ';dbname=' . $_POST['pg_database']; $content = str_replace("define ('STORAGE_SERVER', 'localhost');", "define ('STORAGE_SERVER', '".$_POST['pg_server']."');", $content); $content = str_replace("define ('STORAGE_DB', 'poche');", "define ('STORAGE_DB', '".$_POST['pg_database']."');", $content); @@ -165,7 +174,7 @@ else if (isset($_POST['install'])) { - wallabag — installation + wallabag - installation @@ -176,7 +185,7 @@ else if (isset($_POST['install'])) { - + @@ -262,7 +271,7 @@ php composer.phar install
  • - +