/** * Load the entire configuration from the database * and put it in the session, so we don't need to reload it from db */ private function loadDBConfig(Database $db) { //try to load additional configuration from db //$has_db_config = $this->db->tableExists($this->getTableName('config'), 1); $this->running_config['has_db_config'] = true; $result = $db->query(sprintf('SELECT item, value FROM %s', $this->getTableName('config'))); while ($row = $result->fetch(\PDO::FETCH_ASSOC)) { $this->running_config[$row['item']] = $row['value']; } $_SESSION['running_config'] = $this->running_config; }