Refactor the detection of the case when no database has been selected. re #127

This commit is contained in:
Sébastien Lucas 2013-12-14 11:30:42 +01:00
parent 8a3cc9ed5c
commit a1cb83eea9
4 changed files with 12 additions and 11 deletions

View file

@ -33,7 +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 (is_array ($config['calibre_directory']) && is_null ($database)) {
if (Base::noDatabaseSelected ()) {
$i = 0;
foreach (array_keys ($config['calibre_directory']) as $key) {
$test = Base::getDb ($i);