add an option to detect case problem in the path stored in the database. re #103

Thanks to Ruud for the idea.
Bu işleme şunda yer alıyor:
Sébastien Lucas 2013-10-22 21:40:31 +02:00
ebeveyn 1a77236143
işleme 7e5d386275
1 değiştirilmiş dosya ile 24 ekleme ve 1 silme

Dosyayı Görüntüle

@ -15,6 +15,7 @@
header ("Content-Type:text/html; charset=UTF-8");
$err = getURLParam ("err", -1);
$full = getURLParam ("full");
$error = NULL;
switch ($err) {
case 1 :
@ -151,7 +152,7 @@ Please check
if ($count == 4) {
echo "{$name} OK";
} else {
echo "{$name} Not all Calibre tables were found. Are you you're using the correct database.";
echo "{$name} Not all Calibre tables were found. Are you sure you're using the correct database.";
}
} catch (Exception $e) {
echo "{$name} If the file is readable, check your php configuration. Exception detail : " . $e;
@ -159,6 +160,28 @@ Please check
?>
</h4>
</article>
<?php if ($full) { ?>
<article class="frontpage">
<h2>Check if all Calibre books are found</h2>
<h4>
<?php
try {
$db = new PDO('sqlite:'. Base::getDbFileName ($i));
$result = $db->prepare("select books.path || '/' || data.name || '.' || lower (format) as fullpath from data join books on data.book = books.id");
$result->execute ();
while ($post = $result->fetchObject ())
{
if (!is_file (Base::getDbDirectory ($i) . $post->fullpath)) {
echo "<p>" . Base::getDbDirectory ($i) . $post->fullpath . "</p>";
}
}
} catch (Exception $e) {
echo "{$name} If the file is readable, check your php configuration. Exception detail : " . $e;
}
?>
</h4>
</article>
<?php } ?>
<?php $i++; } ?>
</section>
<footer></footer>