Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This behaviour seems to have been lost with the DBTNG patch.
On the database screen, there is no option selected by default. Since 99.9999% of sites use MySQL, we ought to make it the default.
Comment | File | Size | Author |
---|---|---|---|
#7 | panda.patch | 1.97 KB | Anonymous (not verified) |
#1 | 299330-sad-panda.patch | 2.29 KB | Damien Tournoud |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedNo panda shall remain sad.
Comment #2
webchickHa, thanks!
Works fine. I asked why this is longer than a one-line change, and Damien pointed out that not all installations may have MySQL, so we should only default to it if it exists. Touché.
current(array_keys($drivers)) would be a bit more clear as just key($drivers).
+ $database = isset($databases['default']['default']) ? $databases['default']['default'] : array(); is weird. $database['default']['default']? I realize this isn't specific to this patch, but why a nested array like that? Can we add some documentation to that line?
Comment #3
webchickComment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedNot really. key($drivers) is the key of the current position in $drivers. current(array_keys($drivers)) is the first key of $drivers. There is no real guarantee that both will be equal.
The syntax of the $databases array is described in settings.php:
Comment #5
webchickFair enough then. :)
Comment #6
Dries CreditAttribution: Dries commentedUnfortunately, this panda will have to wait for a re-roll. Patch no longer applies. The end() trick might be better than the current trick.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedi created a duplicate issue for this.
i've attached an updated patch, but it still doesn't quite match the doco. do we want to handle the case i described in the issue above (which this patch doesn't manage), or do we need to update the docs?
Comment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedThe patch in #7 is good to go, thanks justin.
Comment #9
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.