This commit is contained in:
Thomas Citharel 2015-01-31 23:50:40 +01:00
commit 89e8812494
2 changed files with 46 additions and 18 deletions

View file

@ -288,6 +288,27 @@ cursor: pointer;
width: 100%; width: 100%;
overflow: auto; overflow: auto;
} }
.compatibity_result {
margin: auto;
max-width: 300px;
min-height: 50px;
line-height: 50px;
text-align: center;
}
h2, legend {
font-size: 30px;
text-transform: uppercase;
font-family: "PT Sans",sans-serif;
}
legend:after {
content: "";
height: 4px;
width: 70px;
background-color: #000;
display: block;
}
</style> </style>
@ -341,14 +362,16 @@ cursor: pointer;
<p>To install wallabag, you just have to fill the following fields. That's all.</p> <p>To install wallabag, you just have to fill the following fields. That's all.</p>
<p>If you need help, you can read the doc: <a href="docs/" target="_blank">offline documentation</a> and <a href="http://doc.wallabag.org" target="_blank">online one</a> (already up-to-date).</p> <p>If you need help, you can read the doc: <a href="docs/" target="_blank">offline documentation</a> and <a href="http://doc.wallabag.org" target="_blank">online one</a> (already up-to-date).</p>
<p class="detail">Server compatibility test (click to view details) : <?php if (isOkay()) { ?> <div>
<span class="good">All good</span> <h2>Server compatibility test</h2>
<?php } elseif (isPassing()) { ?> <?php if (isOkay()) { ?>
<span class="pass">Some problems, but it's OK !</span> <div class="compatibity_result detail good">All good</div>
<?php } else { ?> <?php } elseif (isPassing()) { ?>
<span class="bad">Bad news : you can't run wallabag</span> <div class="compatibity_result detail pass">Some problems, but it's OK !</div>
<?php } ?> </p> <?php } else { ?>
<?php $status = status(); ?> <div class="compatibity_result detail bad">Bad news : you can't run wallabag</div>
<?php } $status = status(); ?>
</div>
<div class="details"> <div class="details">
<div> <div>
@ -376,6 +399,12 @@ cursor: pointer;
<?php echo ($status['pdo']) ? '<td class="good">Enabled</span>' : '<td class="bad">Disabled'; ?></td> <?php echo ($status['pdo']) ? '<td class="good">Enabled</span>' : '<td class="bad">Disabled'; ?></td>
<td><?php echo ($status['pdo']) ? '<strong>PDO:</strong> You have PDO support enabled.' : '<strong>PDO:</strong> Your PHP installation doesn\'t support PHP PDO. <strong>' . $status['app_name'] . ' will not work here.</strong>' ?></td> <td><?php echo ($status['pdo']) ? '<strong>PDO:</strong> You have PDO support enabled.' : '<strong>PDO:</strong> Your PHP installation doesn\'t support PHP PDO. <strong>' . $status['app_name'] . ' will not work here.</strong>' ?></td>
</tr> </tr>
<tr class="<?php echo ($status['pdo_drivers_passing']) ? 'enabled' : 'disabled'; ?>">
<td>PDO Drivers</td>
<td>One of the PDO drivers must be installed</td>
<?php echo ($status['pdo_drivers_passing']) ? '<td class="good">One driver is enabled</span>' : '<td class="bad">No driver available'; ?></td>
<td><?php echo ($status['pdo_drivers_passing']) ? '<strong>PDO:</strong> You have at least one PDO driver installed.' : '<strong>PDO Drivers:</strong> Your PHP installation doesn\'t have any PDO driver installed. <strong>' . $status['app_name'] . ' will not work here.</strong>' ?></td>
</tr>
<tr class="<?php echo ($status['xml']) ? 'enabled' : 'disabled'; ?>"> <tr class="<?php echo ($status['xml']) ? 'enabled' : 'disabled'; ?>">
<td><a href="http://php.net/xml">XML</a></td> <td><a href="http://php.net/xml">XML</a></td>
<td>Enabled</td> <td>Enabled</td>
@ -466,9 +495,8 @@ cursor: pointer;
</tr> </tr>
</tbody> </tbody>
</table> </table>
<span style="display:inline-block;text-align: right;" class="detail">Close details</span> <hr>
</div> </div>
<hr>
<div class="details"> <div class="details">
<?php //if ($status['php'] && $status['xml'] && $status['pcre'] && $status['mbstring'] && $status['iconv'] && $status['filter'] && $status['allow_url_fopen']) { ?> <?php //if ($status['php'] && $status['xml'] && $status['pcre'] && $status['mbstring'] && $status['iconv'] && $status['filter'] && $status['allow_url_fopen']) { ?>
<?php if (isOkay()) { ?> <?php if (isOkay()) { ?>
@ -486,12 +514,11 @@ cursor: pointer;
<?php } ?> <?php } ?>
</div> </div>
<div class="chunk"> <div class="chunk">
<p class="footnote">This compatibility test has been borrowed (and slightly adapted by <a href="http://fivefilters.org/content-only/">fivefilters.org</a>) from the one supplied by <a href="http://simplepie.org/">SimplePie.org</a>.</a></p> <p class="footnote">This compatibility test has been borrowed (and slightly adapted by <a href="http://fivefilters.org/content-only/">fivefilters.org</a>) from the one supplied by <a href="http://simplepie.org/">SimplePie.org</a>.</a></p>
</div>
<hr>
</div> </div>
</div>
<hr>
<form method="post" class="technical"> <form method="post" class="technical">
<?php if (!is_dir('vendor')) : ?> <?php if (!is_dir('vendor')) : ?>
<div class='messages notice install'>wallabag needs twig, a template engine (<a href="http://twig.sensiolabs.org/">?</a>). Two ways to install it:<br /> <div class='messages notice install'>wallabag needs twig, a template engine (<a href="http://twig.sensiolabs.org/">?</a>). Two ways to install it:<br />
@ -502,14 +529,14 @@ cursor: pointer;
<b>Be careful, zip extension is not enabled in your PHP configuration. You'll have to unzip vendor.zip manually.</b> <b>Be careful, zip extension is not enabled in your PHP configuration. You'll have to unzip vendor.zip manually.</b>
<?php endif; ?> <?php endif; ?>
<em>This method is mainly recommended if you don't have a dedicated server.</em></li> <em>This method is mainly recommended if you don't have a dedicated server.</em></li>
<li>use <a href="http://getcomposer.org/">Composer</a> :<pre><code>curl -s http://getcomposer.org/installer | php <li>use <a href="http://getcomposer.org/">Composer</a> in your wallabag folder :<pre><code>curl -s http://getcomposer.org/installer | php
php composer.phar install</code></pre></li> php composer.phar install</code></pre></li>
</ul> </ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<div class="database_info"> <div class="database_info">
<fieldset class="database_inputs"> <fieldset class="database_inputs">
<legend><strong>Technical settings</strong></legend> <legend><strong>Database settings</strong></legend>
<p> <p>
Database engine: Database engine:
<ul> <ul>

View file

@ -26,6 +26,7 @@ $allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
$filter_ok = extension_loaded('filter'); $filter_ok = extension_loaded('filter');
$gettext_ok = function_exists("gettext"); $gettext_ok = function_exists("gettext");
$gd_ok = extension_loaded('gd'); $gd_ok = extension_loaded('gd');
$pdo_drivers_passing = extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql');
if (extension_loaded('xmlreader')) { if (extension_loaded('xmlreader')) {
$xml_ok = true; $xml_ok = true;
@ -38,7 +39,7 @@ if (extension_loaded('xmlreader')) {
$xml_ok = false; $xml_ok = false;
} }
$status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok, 'xml' => $xml_ok, 'pcre' => $pcre_ok, 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok, 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok, 'gettext' => $gettext_ok, 'gd' => $gd_ok); $status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok, 'pdo_drivers_passing' => $pdo_drivers_passing, 'xml' => $xml_ok, 'pcre' => $pcre_ok, 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok, 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok, 'gettext' => $gettext_ok, 'gd' => $gd_ok);
return $status; return $status;
} }