Update database.php add comments

This commit is contained in:
FusionPBX 2024-05-02 06:40:30 -06:00 committed by GitHub
parent 557afd01ad
commit d9c92c00e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -279,6 +279,8 @@
* @param array $params Optional
*/
public function __construct(array $params = []) {
//handle the config object
if (isset($params['config'])) {
$config = $params['config'];
}
@ -305,9 +307,11 @@
//connect to the database now
$this->connect();
//use the session domain_uuid
if (!isset($this->domain_uuid) && isset($_SESSION['domain_uuid'])) {
$this->domain_uuid = $_SESSION['domain_uuid'];
}
//allow passed domain_uuid in the constructor to override the session domain
if (isset($params['domain_uuid'])) {
$this->domain_uuid = $params['domain_uuid'];