Development

Changeset 16939

You must first sign up to be able to contribute.

Changeset 16939

Show
Ignore:
Timestamp:
04/03/09 16:24:48 (4 years ago)
Author:
boutell
Message:

Allow use of class constants like PORT_SECURE in app.yml (you don't
need/want to put the class name in there, just the right hand side)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrineApplyPlugin/trunk/modules/sfApply/lib/BasesfApplyActions.class.php

    r16935 r16939  
    259259        $encryption = null; 
    260260      } 
     261      $port = sfConfig::get('app_sfApplyPlugin_mailer_port', null); 
     262 
     263      // Allow use of constants like PORT_SECURE in app.yml 
     264 
     265      if ((!is_null($port)) && (!preg_match("/^\d+$/", $port))) 
     266      { 
     267        $port = constant("Swift_Connection_SMTP::$port"); 
     268      } 
     269 
    261270      $connection = new Swift_Connection_SMTP( 
    262271        sfConfig::get('app_sfApplyPlugin_mailer_host', null), 
    263         sfConfig::get('app_sfApplyPlugin_mailer_port', null)
     272        $port
    264273        $encryption); 
    265274    }