osclass/OSClass — pull request #34 by jnv (2011-11-27 18:08:21+00:00)
Title: Add __wakeup method to DAO for proper unserialization

With some versions of PHP (or possibly in some environments) the User Alerts page doesn't work due to "Couldn't fetch mysqli" error (see issue #19). I believe this is caused by unserialization of a Search object from database - once unserialized, it may have invalid database connection identifier.

I've added __wakeup method to the DAO object to reinitialize database connection. Although this is Search class specific bug, I think the reconnection should be made in the same class as connection.

Further improvement would be to to clean-up $this->dao before serialization with __sleep method or Serializable interface.