Author: Jonathan.Wage
Date: 2010-01-31 18:15:41 +0100 (Sun, 31 Jan 2010)
New Revision: 27361
Modified:
plugins/sfSympalPlugin/trunk/config/app.yml
plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
Log:
[1.4][sfSympalPlugin][1.0] Added ability to disable modules
Modified: plugins/sfSympalPlugin/trunk/config/app.yml
===================================================================
--- plugins/sfSympalPlugin/trunk/config/app.yml 2010-01-31 17:15:08 UTC (rev
27360)
+++ plugins/sfSympalPlugin/trunk/config/app.yml 2010-01-31 17:15:41 UTC (rev
27361)
@@ -208,9 +208,12 @@
# Enable and disable the check for upgrades via the web when on the Sympal
dashboard
check_for_upgrades_on_dashboard: false
- # Whether or not to enable all modules found in Sympal plugins
+ # Whether or not to enable all modules found in your project
enable_all_modules: true
+ # Array of modules to disable
+ disabled_modules: []
+
# Callback to retrieve the cache driver used for storing various Sympal
cache entries
get_cache_driver_callback: [sfSympalCache, getCacheDriver]
Modified: plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
2010-01-31 17:15:08 UTC (rev 27360)
+++ plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
2010-01-31 17:15:41 UTC (rev 27361)
@@ -367,6 +367,12 @@
} else {
$modules = array_merge($modules,
sfSympalConfig::get('enabled_modules', null, array()));
}
+
+ if ($disabledModules = sfSympalConfig::get('disabled_modules', null,
array()))
+ {
+ $modules = array_diff($modules, $disabledModules);
+ }
+
sfConfig::set('sf_enabled_modules', $modules);
}
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.