Override enabled module/theme list dynamically using variable override in settings.php
moshe weitzman - November 6, 2009 - 16:40
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | task |
| Priority: | normal |
| Assigned: | moshe weitzman |
| Status: | needs review |
Description
It can be very handy to dynamically enable/disable a module for your site. Assume you might share copies of same DB between live and development environments. You can enable devel module just for your dev environment and keep it disabled in the system table. Similarly, you might enable a module that logs all email rather than sending email when in dev environment.
Depends on #623992: Reduce {system} database hits, so it won't pass unit tests at least until that lands.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| module_variable.patch | 2.36 KB | Idle | Failed: Failed to apply patch. | View details | Re-test |

#1
The last submitted patch failed testing.
#2
Dependant patch has landed.
#3
Only 359 passes because #623992: Reduce {system} database hits is still broken. Being worked on.
#4
This would be really handy for local sandboxes and shared development sites - where you'll often have devel etc. in sites/all and have to keep re-enabling them every time you bring down the live database. Patch looks clean, won't have any appreciable performance impact on live sites.