]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #588 from mariroz/dev
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 30 Mar 2014 18:04:55 +0000 (20:04 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 30 Mar 2014 18:04:55 +0000 (20:04 +0200)
fix of bug with default theme constant

install/index.php
wallabag_compatibility_test.php

index b21cec521d0f8b2782acd8c8e977deb90e7bcbd1..599bbe2bb7612936a9606d7542251128f6ac34cc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 $errors = array();
 $successes = array();
-if ($_POST['download']) {
+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 <a href="http://wllbg.org/vendor">download it manually<∕a> and unzip it in your wallabag folder.';
     }
@@ -25,7 +25,7 @@ if ($_POST['download']) {
         }
     }
 }
-else if ($_POST['install']) {
+else if (isset($_POST['install'])) {
     if (!is_dir('vendor')) {
         $errors[] = 'You must install twig before.';
     }
@@ -68,6 +68,7 @@ else if ($_POST['install']) {
             }
             else {
                 $content = file_get_contents('inc/poche/config.inc.php');
+                $sql_structure = '';
 
                 if ($_POST['db_engine'] == 'mysql') {
                     $db_path = 'mysql:host=' . $_POST['mysql_server'] . ';dbname=' . $_POST['mysql_database'];
@@ -225,11 +226,7 @@ php composer.phar install</code></pre></li>
                     <p>
                         Database engine:
                         <ul>
-                            <li><label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" />
-                            <div id="pdo_sqlite" class='messages error install'>
-                                <p>You have to enable <a href="http://php.net/manual/ref.pdo-sqlite.php">pdo_sqlite extension</a>.</p>
-                            </div>
-                            </li>
+                            <li><label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" /></li>
                             <li>
                                 <label for="mysql">MySQL</label> <input name="db_engine" type="radio" id="mysql" value="mysql" />
                                 <ul id="mysql_infos">
@@ -267,49 +264,26 @@ php composer.phar install</code></pre></li>
                     </p>
                 </fieldset>
 
-                <input type="submit" id="install_button" value="Install wallabag" name="install" />
+                <input type="submit" value="Install wallabag" name="install" />
             </form>
         </div>
         <script>
             $("#mysql_infos").hide();
             $("#pg_infos").hide();
-
-            <?php
-            if (!extension_loaded('pdo_sqlite')) : ?>
-            $("#install_button").hide();
-            <?php
-            else :
-            ?>
-            $("#pdo_sqlite").hide();
-            <?php
-            endif;
-            ?>
-
             $("input[name=db_engine]").click(function() 
                 {
                     if ( $("#mysql").prop('checked')) {
                         $("#mysql_infos").show();
                         $("#pg_infos").hide();
-                        $("#pdo_sqlite").hide();
-                        $("#install_button").show();
                     }
                     else {
                         if ( $("#postgresql").prop('checked')) {
                             $("#mysql_infos").hide();
                             $("#pg_infos").show();
-                            $("#pdo_sqlite").hide();
-                            $("#install_button").show();
                         }
                         else {
                             $("#mysql_infos").hide();
                             $("#pg_infos").hide();
-                            <?php
-                            if (!extension_loaded('pdo_sqlite')) : ?>
-                            $("#pdo_sqlite").show();
-                            $("#install_button").hide();
-                            <?php
-                            endif;
-                            ?>
                         }
                     }
                 });
index 51ea31e14c9c7bf16cf37eb8769e25eddaff4fef..7a52767c3fcadbdf7d661d9d1f51cc78fbcdef92 100644 (file)
@@ -171,7 +171,13 @@ background-color:#FF9500;
 </head>
 
 <body>
-
+<?php
+$frominstall = false;
+if (isset($_GET['from'])){
+       if ($_GET['from'] == 'install'){
+               $frominstall = true;
+               }}
+?>
 <div id="site">
        <div id="content">
 
@@ -337,15 +343,23 @@ background-color:#FF9500;
                        <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok && $gettext_ok) { ?>
                                <h3>Bottom Line: Yes, you can!</h3>
                                <p><em>Your webhost has its act together!</em></p>
+                               <?php if (!$frominstall) { ?>
                                <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p>
-                               <p>If you already have done that, you should access <a href="index.php">the index.php file</a> of your installation to configure and start using wallabag</p>
+                               <p>If you already have done that, you should access <a href="index.php">the index.php file</a> of your installation to configure and/or start using wallabag</p>
+                               <?php } else { ?>
+                               <p>You can now <a href="index.php">return to the installation section</a>.</p>
+                               <?php } ?>
                                <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost &mdash; it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p>
                        <?php //} else if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $allow_url_fopen_ok && $filter_ok) { ?>
                        <?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok && $gettext_ok) { ?>
                                <h3>Bottom Line: Yes, you can!</h3>
                                <p><em>For most feeds, it'll run with no problems.</em> There are certain languages that you might have a hard time with though.</p>
+                               <?php if (!$frominstall) { ?>
                                <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p>
-                               <p>If you already have done that, you should access <a href="index.php">the index.php file</a> of your installation to configure and start using wallabag</p>
+                               <p>If you already have done that, you should access <a href="index.php">the index.php file</a> of your installation to configure and/or start using wallabag</p>
+                               <?php } else { ?>
+                               <p>You can now <a href="index.php">return to the installation section</a>.</p>
+                               <?php } ?>
                                <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost &mdash; it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p>
                        <?php } else { ?>
                                <h3>Bottom Line: We're sorry…</h3>