Skip to content
Commit 96bc811a authored by Richard Klees's avatar Richard Klees
Browse files

Setup: fixed odd missing database error (#25166)

The reason for this problem is some very chaotic handling of new instances of
ilClient, caching in ilDbSetup and initialisation and distribution of database
instances. ilClient::getDbSetup uses static methods from ilDbSetup that cache
instances via client_id. The DBSetup instance is tied to the ilClient it was
created. ilSetup produces two instances of ilClient, one for querying the status
and one for actual actions on the client. The second instance is the one that is
used to attempt login. Since ilDbSetup doesn't take into account that two
instances for the same client might have been created, it returns a cached
instance for the client id. This in fact is bound to the first ilClient instance
and sets the db on that one (in provideGlobalDB) instead of setting the db on
the second ilClient-instance which is the one that is in fact used afterwards.

The problem at hand was solved by moving the caching of ilDbSetup instances to
the ilClient. The root-cause was not solved here and the setup remains in its
generally messy state for now.
parent 53261b61
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment