| | |
| | | public $comm_path = './'; |
| | | |
| | | private $texts; |
| | | private $books = array(); |
| | | |
| | | |
| | | /** |
| | |
| | | else { // $id == 'sql' |
| | | $contacts = new rcube_contacts($this->db, $this->user->ID); |
| | | } |
| | | |
| | | // add to the 'books' array for shutdown function |
| | | if (!in_array($contacts, $this->books)) |
| | | $this->books[] = $contacts; |
| | | |
| | | return $contacts; |
| | | } |
| | |
| | | if (is_object($this->smtp)) |
| | | $this->smtp->disconnect(); |
| | | |
| | | if (is_object($this->contacts)) |
| | | $this->contacts->close(); |
| | | foreach ($this->books as $book) |
| | | if (is_object($book)) |
| | | $book->close(); |
| | | |
| | | // before closing the database connection, write session data |
| | | if ($_SERVER['REMOTE_ADDR']) |