Permalink
Browse files

enabled to registering routes manually

  • Loading branch information...
1 parent 97fdc28 commit 1cee07cf9a1c9af9d9ea7e58aad294f124907413 @nibsirahsieu committed Jun 7, 2011
Showing with 8 additions and 3 deletions.
  1. +2 −2 config/sfNestedCommentPluginConfiguration.class.php
  2. +6 −1 lib/sfNestedCommentConfig.class.php
@@ -7,12 +7,12 @@ public function initialize()
{
if ($this->configuration instanceof sfApplicationConfiguration)
{
- if (in_array('sfNestedComment', sfConfig::get('sf_enabled_modules', array())))
+ if (sfNestedCommentConfig::isRoutesRegister() && in_array('sfNestedComment', sfConfig::get('sf_enabled_modules', array())))
{
$this->dispatcher->connect('routing.load_configuration', array('sfNestedCommentRouting', 'listenToRoutingLoadConfigurationEvent'));
}
- if (in_array('sfNestedCommentAdmin', sfConfig::get('sf_enabled_modules', array())))
+ if (sfNestedCommentConfig::isRoutesRegister() && in_array('sfNestedCommentAdmin', sfConfig::get('sf_enabled_modules', array())))
{
$this->dispatcher->connect('routing.load_configuration', array('sfNestedCommentRouting', 'addRouteForNestedCommentAdmin'));
}
View
@@ -107,4 +107,9 @@ static public function getRecaptchaPrivateKey()
{
return sfConfig::get('app_recaptcha_private_key');
}
-}
+
+ static public function isRoutesRegister()
+ {
+ return sfConfig::get('app_sfNestedComment_routes_register', true);
+ }
+}

0 comments on commit 1cee07c

Please sign in to comment.