Fork me on GitHub
Subscribe 1

Ticket #489 (fixed enhancement)

Simplify factory method for database layer

  • Created: 2011-09-14 14:55:52
  • Reported by: Franz
  • Assigned to: Franz
  • Milestone: 2.0-alpha1
  • Component: database
  • Priority: high

The database connection is currently handled rather hackish. For example, right now there is no way to change the database type because the value is still hard-coded.

This needs to be sorted out and cleaned up.

History

Franz 2011-09-14 16:10:04

Commit e0ce37b to fluxbb fluxbb-2.0-db

#489: Move DSN to config file. Update database submodule accordingly.

Franz 2011-09-14 16:15:56

With that last commit, the database type (actually, the whole DSN string) is now read from the config file. That should help.

What remains is assembling the options array in the config file, too, so that we don't have this parameter mess in include/common.php.

Franz 2011-10-26 21:52:18

  • Status changed from open to fixed.

This is not yet adapted in the core, but we now have a proper factory method for the adapter class, that simply gets an array of options and then generates the proper DSN on its own.