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.

AttachmentSizeStatusTest resultOperations
module_variable.patch2.36 KBIdleFailed: Failed to apply patch.View details | Re-test

#1

System Message - November 6, 2009 - 16:45
Status:needs review» needs work

The last submitted patch failed testing.

#2

moshe weitzman - November 8, 2009 - 12:42
Status:needs work» needs review

Dependant patch has landed.

AttachmentSizeStatusTest resultOperations
mod_var.diff2.36 KBIdlePassed: 14706 passes, 0 fails, 0 exceptionsView details | Re-test

#3

Dries - November 8, 2009 - 19:25

Only 359 passes because #623992: Reduce {system} database hits is still broken. Being worked on.

#4

catch - November 10, 2009 - 06:04

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.

 
 

Drupal is a registered trademark of Dries Buytaert.