WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21663, comment 26


Ignore:
Timestamp:
01/03/13 18:58:27 (16 months ago)
Author:
hakre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21663, comment 26

    initial v1  
    88To reduce the levels of indirection, it is probably more straight forward to offer a set of default database classes that Wordpress can load (by configuration). If you work with Interfaces, it is not important any longer if that included database class then is having a full blown driver implementation loading diverse drivers or is just a straight-forward database class as we have it since years (and as we love it). The legacy database class then can become the blueprint for the interface. 
    99 
    10 Next generation classes could implement and interface that extends from the legacy one (to deal with the problems the original implementation has, or at least to offer some way to deal with it). 
     10Next generation classes could implement an interface that extends from the legacy interface (to deal with the problems the original implementation has, or at least to offer some way to deal with it). 
    1111 
    1212Also I suggest you leave warnings all over the place that the prepare function is misnamed. I've seen on the Wordpress dev blog that users are being told this is the way to "prepare" just not so long ago, but the prepare function actually just verifies and sanitizes the first string parameter (the query) and then does some dumb stuff on the passed array that should represent values. This is the exact opposite of what prepared and parametrized queries are.