Factorize a little more the DB handling. re #127
This commit is contained in:
förälder
3df11c6ef7
incheckning
cd626b25ef
3 ändrade filer med 24 tillägg och 13 borttagningar
11
index.php
11
index.php
|
@ -33,16 +33,7 @@
|
|||
|
||||
// Access the database ASAP to be sure it's readable, redirect if that's not the case.
|
||||
// It has to be done before any header is sent.
|
||||
if (Base::noDatabaseSelected ()) {
|
||||
$i = 0;
|
||||
foreach (array_keys ($config['calibre_directory']) as $key) {
|
||||
$test = Base::getDb ($i);
|
||||
Base::clearDb ();
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
$test = Base::getDb ();
|
||||
}
|
||||
Base::checkDatabaseAvailability ();
|
||||
|
||||
if ($config ['cops_fetch_protect'] == "1") {
|
||||
session_start();
|
||||
|
|
Laddar…
Lägg till tabell
Add a link
Hänvisa till i nytt ärende