diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-02-10 00:32:38 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-02-10 00:32:38 +0100 |
commit | 8d7ec54658cfe94cd7cab0f5979afcec962188f5 (patch) | |
tree | 2b07d17f888d902df00da8b7c64440a485d76e52 /install/index.php | |
parent | b65d65be3121f29009c5dd985f4d2662e4f20c52 (diff) | |
download | wallabag-8d7ec54658cfe94cd7cab0f5979afcec962188f5.tar.gz wallabag-8d7ec54658cfe94cd7cab0f5979afcec962188f5.tar.zst wallabag-8d7ec54658cfe94cd7cab0f5979afcec962188f5.zip |
improvements for the installer
Diffstat (limited to 'install/index.php')
-rwxr-xr-x | install/index.php | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/install/index.php b/install/index.php index 30bc2f6b..1f11413a 100755 --- a/install/index.php +++ b/install/index.php | |||
@@ -296,7 +296,7 @@ cursor: pointer; | |||
296 | } | 296 | } |
297 | .compatibity_result { | 297 | .compatibity_result { |
298 | margin: auto; | 298 | margin: auto; |
299 | max-width: 300px; | 299 | max-width: 350px; |
300 | min-height: 50px; | 300 | min-height: 50px; |
301 | line-height: 50px; | 301 | line-height: 50px; |
302 | text-align: center; | 302 | text-align: center; |
@@ -386,10 +386,10 @@ border: 1px solid #000; | |||
386 | <?php if (isOkay()) { ?> | 386 | <?php if (isOkay()) { ?> |
387 | <div class="compatibity_result detail good">All good</div> | 387 | <div class="compatibity_result detail good">All good</div> |
388 | <?php } elseif (isPassing()) { ?> | 388 | <?php } elseif (isPassing()) { ?> |
389 | <div class="compatibity_result detail pass">Some problems, but it's OK !</div> | 389 | <div class="compatibity_result detail pass">Some warnings, but the minimum is here !</div> |
390 | <?php } else { ?> | 390 | <?php } else { ?> |
391 | <div class="compatibity_result detail bad">Bad news : you can't run wallabag</div> | 391 | <div class="compatibity_result detail bad">Bad news : you can't run wallabag</div> |
392 | <?php } $status = status(); ?> | 392 | <?php } $status = status(); $pdo_drivers = pdoDrivers(); ?> |
393 | </div> | 393 | </div> |
394 | 394 | ||
395 | <div class="details"> | 395 | <div class="details"> |
@@ -569,38 +569,54 @@ php composer.phar install</code></pre> | |||
569 | <p> | 569 | <p> |
570 | Database engine: | 570 | Database engine: |
571 | <ul> | 571 | <ul> |
572 | <li><label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" /> | 572 | <li> |
573 | <div id="pdo_sqlite" class='messages error install'> | 573 | <?php if ($pdo_drivers['sqlite']) { ?> |
574 | <p>You have to enable <a href="http://php.net/manual/ref.pdo-sqlite.php">pdo_sqlite extension</a>.</p> | 574 | <label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" /> |
575 | </div> | 575 | <?php } else { ?> |
576 | </li> | 576 | <div class="messages notice"> |
577 | <li> | 577 | <p>You have to enable <a href="http://php.net/manual/ref.pdo-sqlite.php">pdo_sqlite extension</a> to use SQLite.</p> |
578 | <label for="mysql">MySQL</label> <input name="db_engine" type="radio" id="mysql" value="mysql" /> | 578 | </div> |
579 | <div id="pdo_mysql" class='messages notice install'> | 579 | <?php } ?> |
580 | <p>All fields have to be filled.</p> | 580 | </li> |
581 | </div> | 581 | <li> |
582 | <ul id="mysql_infos"> | 582 | <?php if ($pdo_drivers['mysql']) { ?> |
583 | <li><label for="mysql_server">Server</label> <input type="text" placeholder="localhost" id="mysql_server" name="mysql_server" /></li> | 583 | <label for="mysql">MySQL</label> <input name="db_engine" type="radio" id="mysql" value="mysql" /> |
584 | <li><label for="mysql_database">Database</label> <input type="text" placeholder="wallabag" id="mysql_database" name="mysql_database" /></li> | 584 | <div id="pdo_mysql" class='messages notice install'> |
585 | <li><label for="mysql_user">User</label> <input type="text" placeholder="user" id="mysql_user" name="mysql_user" /></li> | 585 | <p>All fields have to be filled.</p> |
586 | <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li> | 586 | </div> |
587 | <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4"> | 587 | <ul id="mysql_infos"> |
588 | <div id="utf8_mb4_infos"><em>Warning :</em> UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3. | 588 | <li><label for="mysql_server">Server</label> <input type="text" placeholder="localhost" id="mysql_server" name="mysql_server" /></li> |
589 | <li><label for="mysql_database">Database</label> <input type="text" placeholder="wallabag" id="mysql_database" name="mysql_database" /></li> | ||
590 | <li><label for="mysql_user">User</label> <input type="text" placeholder="user" id="mysql_user" name="mysql_user" /></li> | ||
591 | <li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li> | ||
592 | <li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4"> | ||
593 | <div id="utf8_mb4_infos"><em>Warning :</em> UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3. | ||
589 | Install will failed if you check this while using an older MySQL server.</div></li> | 594 | Install will failed if you check this while using an older MySQL server.</div></li> |
590 | </ul> | 595 | </ul> |
591 | </li> | 596 | <?php } else { ?> |
592 | <li> | 597 | <div class="messages notice"> |
593 | <label for="postgres">PostgreSQL</label> <input name="db_engine" type="radio" id="postgres" value="postgres" /> | 598 | <p>You have to enable <a href="http://php.net/manual/ref.pdo-mysql.php">pdo_mysql extension</a> to use MySQL.</p> |
594 | <div id="pdo_postgres" class='messages notice install'> | 599 | </div> |
600 | <?php } ?> | ||
601 | </li> | ||
602 | <li> | ||
603 | <?php if ($pdo_drivers['postgres']) { ?> | ||
604 | <label for="postgres">PostgreSQL</label> <input name="db_engine" type="radio" id="postgres" value="postgres" /> | ||
605 | <div id="pdo_postgres" class='messages notice install'> | ||
595 | <p>All fields have to be filled.</p> | 606 | <p>All fields have to be filled.</p> |
596 | </div> | 607 | </div> |
597 | <ul id="pg_infos"> | 608 | <ul id="pg_infos"> |
598 | <li><label for="pg_server">Server</label> <input type="text" placeholder="localhost" id="pg_server" name="pg_server" /></li> | 609 | <li><label for="pg_server">Server</label> <input type="text" placeholder="localhost" id="pg_server" name="pg_server" /></li> |
599 | <li><label for="pg_database">Database</label> <input type="text" placeholder="wallabag" id="pg_database" name="pg_database" /></li> | 610 | <li><label for="pg_database">Database</label> <input type="text" placeholder="wallabag" id="pg_database" name="pg_database" /></li> |
600 | <li><label for="pg_user">User</label> <input type="text" placeholder="user" id="pg_user" name="pg_user" /></li> | 611 | <li><label for="pg_user">User</label> <input type="text" placeholder="user" id="pg_user" name="pg_user" /></li> |
601 | <li><label for="pg_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="pg_password" name="pg_password" /></li> | 612 | <li><label for="pg_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="pg_password" name="pg_password" /></li> |
602 | </ul> | 613 | </ul> |
603 | </li> | 614 | <?php } else { ?> |
615 | <div class="messages notice"> | ||
616 | <p>You have to enable <a href="https://php.net/manual/ref.pdo-pgsql.php">pdo_pgsql extension</a> to use PostgreSQL.</p> | ||
617 | </div> | ||
618 | <?php } ?> | ||
619 | </li> | ||
604 | </ul> | 620 | </ul> |
605 | </p> | 621 | </p> |
606 | </fieldset> | 622 | </fieldset> |
@@ -672,17 +688,6 @@ php composer.phar install</code></pre> | |||
672 | endif; | 688 | endif; |
673 | ?> | 689 | ?> |
674 | 690 | ||
675 | <?php | ||
676 | if (!extension_loaded('pdo_sqlite')) : ?> | ||
677 | $("#install_button").hide(); | ||
678 | <?php | ||
679 | else : | ||
680 | ?> | ||
681 | $("#pdo_sqlite").hide(); | ||
682 | <?php | ||
683 | endif; | ||
684 | ?> | ||
685 | |||
686 | $("#mysql_utf8_mb4").click(function() { | 691 | $("#mysql_utf8_mb4").click(function() { |
687 | $("#utf8_mb4_infos").toggle(); | 692 | $("#utf8_mb4_infos").toggle(); |
688 | }); | 693 | }); |
@@ -720,13 +725,6 @@ php composer.phar install</code></pre> | |||
720 | $("#sqlite_description").show(); | 725 | $("#sqlite_description").show(); |
721 | $("#mysql_description").hide(); | 726 | $("#mysql_description").hide(); |
722 | $("#postgres_description").hide(); | 727 | $("#postgres_description").hide(); |
723 | <?php | ||
724 | if (!extension_loaded('pdo_sqlite')) : ?> | ||
725 | $("#pdo_sqlite").show(); | ||
726 | $("#install_button").hide(); | ||
727 | <?php | ||
728 | endif; | ||
729 | ?> | ||
730 | } | 728 | } |
731 | } | 729 | } |
732 | }); | 730 | }); |