Init actions and db
Ten commit jest zawarty w:
rodzic
acd9b72097
commit
1acce6509c
6 zmienionych plików z 124 dodań i 52 usunięć
|
|
@ -6,24 +6,22 @@
|
|||
* @author Didier Corbière <didier.corbiere@opale-concept.com>
|
||||
*/
|
||||
|
||||
foreach ($gConfig['databases'] as $dbConfig) {
|
||||
// Init database file
|
||||
$fileName = $dbConfig['db_path'] . DIRECTORY_SEPARATOR . 'metadata.db';
|
||||
try {
|
||||
// Open or create the database
|
||||
$db = new CalibreDbLoader($fileName, $gConfig['create_db']);
|
||||
echo sprintf('Load database %s', $fileName) . '<br />';
|
||||
// Add the epub files into the database
|
||||
if (!empty($dbConfig['epub_path'])) {
|
||||
$fileList = glob($dbConfig['epub_path'] . DIRECTORY_SEPARATOR . '*.epub');
|
||||
foreach ($fileList as $fileName) {
|
||||
$db->AddEpub($fileName);
|
||||
}
|
||||
// Init database file
|
||||
$fileName = $dbConfig['db_path'] . DIRECTORY_SEPARATOR . 'metadata.db';
|
||||
try {
|
||||
// Open or create the database
|
||||
$db = new CalibreDbLoader($fileName, $gConfig['create_db']);
|
||||
echo sprintf('Load database %s', $fileName) . '<br />';
|
||||
// Add the epub files into the database
|
||||
if (!empty($dbConfig['epub_path'])) {
|
||||
$fileList = glob($dbConfig['epub_path'] . DIRECTORY_SEPARATOR . '*.epub');
|
||||
foreach ($fileList as $fileName) {
|
||||
$db->AddEpub($fileName);
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$gErrorArray[$fileName] = $e->getMessage();
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$gErrorArray[$fileName] = $e->getMessage();
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Ładowanie…
Dodaj tabelę
Add a link
Odniesienie w nowym zgłoszeniu