mirror of https://github.com/wallabag/wallabag.git
[fix] #483 pdo_sqlite not required if we want mysql / pgsql
This commit is contained in:
parent
d429305836
commit
2bb207d005
|
@ -13,16 +13,6 @@ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check PDO Sqlite
|
|
||||||
if (! extension_loaded('pdo_sqlite')) {
|
|
||||||
die('PHP extension required: pdo_sqlite');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check ZIP
|
|
||||||
if (! extension_loaded('zip')) {
|
|
||||||
die('PHP extension required: zip');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if /cache is writeable
|
// Check if /cache is writeable
|
||||||
if (! is_writable('cache')) {
|
if (! is_writable('cache')) {
|
||||||
die('The directory "cache" must be writeable by your web server user');
|
die('The directory "cache" must be writeable by your web server user');
|
||||||
|
|
|
@ -225,7 +225,11 @@ php composer.phar install</code></pre></li>
|
||||||
<p>
|
<p>
|
||||||
Database engine:
|
Database engine:
|
||||||
<ul>
|
<ul>
|
||||||
<li><label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" /></li>
|
<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>
|
<li>
|
||||||
<label for="mysql">MySQL</label> <input name="db_engine" type="radio" id="mysql" value="mysql" />
|
<label for="mysql">MySQL</label> <input name="db_engine" type="radio" id="mysql" value="mysql" />
|
||||||
<ul id="mysql_infos">
|
<ul id="mysql_infos">
|
||||||
|
@ -263,26 +267,49 @@ php composer.phar install</code></pre></li>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<input type="submit" value="Install wallabag" name="install" />
|
<input type="submit" id="install_button" value="Install wallabag" name="install" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$("#mysql_infos").hide();
|
$("#mysql_infos").hide();
|
||||||
$("#pg_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()
|
$("input[name=db_engine]").click(function()
|
||||||
{
|
{
|
||||||
if ( $("#mysql").prop('checked')) {
|
if ( $("#mysql").prop('checked')) {
|
||||||
$("#mysql_infos").show();
|
$("#mysql_infos").show();
|
||||||
$("#pg_infos").hide();
|
$("#pg_infos").hide();
|
||||||
|
$("#pdo_sqlite").hide();
|
||||||
|
$("#install_button").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( $("#postgresql").prop('checked')) {
|
if ( $("#postgresql").prop('checked')) {
|
||||||
$("#mysql_infos").hide();
|
$("#mysql_infos").hide();
|
||||||
$("#pg_infos").show();
|
$("#pg_infos").show();
|
||||||
|
$("#pdo_sqlite").hide();
|
||||||
|
$("#install_button").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#mysql_infos").hide();
|
$("#mysql_infos").hide();
|
||||||
$("#pg_infos").hide();
|
$("#pg_infos").hide();
|
||||||
|
<?php
|
||||||
|
if (!extension_loaded('pdo_sqlite')) : ?>
|
||||||
|
$("#pdo_sqlite").show();
|
||||||
|
$("#install_button").hide();
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue