Development

Changeset 6660

You must first sign up to be able to contribute.

Changeset 6660

Show
Ignore:
Timestamp:
12/21/07 08:03:20 (10 months ago)
Author:
fabien
Message:

removed sfConfig dependency for the user sub-framework

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/config/sfFactoryConfigHandler.class.php

    r6551 r6660  
    124124 
    125125        case 'user': 
    126           $instances[] = sprintf("  \$class = sfConfig::get('sf_factory_user', '%s');\n  \$this->factories['user'] = new \$class(\$this->dispatcher, \$this->factories['storage'], array_merge(array('auto_shutdown' => false, 'culture' => \$this->factories['request']->getParameter('sf_culture'), 'default_culture' => sfConfig::get('sf_i18n_default_culture'), 'use_flash' => sfConfig::get('sf_use_flash')), sfConfig::get('sf_factory_user_parameters', %s)));", $class, var_export(is_array($parameters) ? $parameters : array(), true)); 
     126          $instances[] = sprintf("  \$class = sfConfig::get('sf_factory_user', '%s');\n  \$this->factories['user'] = new \$class(\$this->dispatcher, \$this->factories['storage'], array_merge(array('auto_shutdown' => false, 'culture' => \$this->factories['request']->getParameter('sf_culture'), 'default_culture' => sfConfig::get('sf_i18n_default_culture'), 'use_flash' => sfConfig::get('sf_use_flash'), 'logging' => sfConfig::get('sf_logging_enabled')), sfConfig::get('sf_factory_user_parameters', %s)));", $class, var_export(is_array($parameters) ? $parameters : array(), true)); 
    127127          break; 
    128128 
  • branches/1.1/lib/user/sfBasicSecurityUser.class.php

    r6658 r6660  
    6363        if ($credential == $value) 
    6464        { 
    65           if (sfConfig::get('sf_logging_enabled')) 
     65          if ($this->getParameter('logging')) 
    6666          { 
    6767            $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Remove credential "%s"', $credential)))); 
     
    9797    $credentials = (is_array(func_get_arg(0))) ? func_get_arg(0) : func_get_args(); 
    9898 
    99     if (sfConfig::get('sf_logging_enabled')) 
     99    if ($this->getParameter('logging')) 
    100100    { 
    101101      $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Add credential(s) "%s"', implode(', ', $credentials))))); 
     
    172172  public function setAuthenticated($authenticated) 
    173173  { 
    174     if (sfConfig::get('sf_logging_enabled')) 
     174    if ($this->getParameter('logging')) 
    175175    { 
    176176      $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('User is %sauthenticated', $authenticated === true ? '' : 'not ')))); 
     
    240240      if (false !== $timeout && !is_null($this->lastRequest) && time() - $this->lastRequest >= $timeout) 
    241241      { 
    242         if (sfConfig::get('sf_logging_enabled')) 
     242        if ($this->getParameter('logging')) 
    243243        { 
    244244          $this->dispatcher->notify(new sfEvent($this, 'application.log', array('Automatic user logout due to timeout'))); 
  • branches/1.1/lib/user/sfUser.class.php

    r6606 r6660  
    9595    if ($this->getParameter('use_flash', false) && $names = $this->attributeHolder->getNames('symfony/user/sfUser/flash')) 
    9696    { 
    97       if (sfConfig::get('sf_logging_enabled')) 
     97      if ($this->getParameter('logging')) 
    9898      { 
    9999        $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Flag old flash messages ("%s")', implode('", "', $names))))); 
     
    243243    if ($this->getParameter('use_flash', false) && $names = $this->attributeHolder->getNames('symfony/user/sfUser/flash/remove')) 
    244244    { 
    245       if (sfConfig::get('sf_logging_enabled')) 
     245      if ($this->getParameter('logging')) 
    246246      { 
    247247        $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Remove old flash messages ("%s")', implode('", "', $names)))));