From: <vb...@us...> - 2007-12-17 00:24:59
|
Revision: 4832 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=4832&view=rev Author: vboctor Date: 2007-12-16 16:24:56 -0800 (Sun, 16 Dec 2007) Log Message: ----------- Fixed #8674: Php script for sending mail via cronjob raise error when lang set to auto. Modified Paths: -------------- branches/BRANCH_1_1_0/mantisbt/core/email_api.php Modified: branches/BRANCH_1_1_0/mantisbt/core/email_api.php =================================================================== --- branches/BRANCH_1_1_0/mantisbt/core/email_api.php 2007-12-12 19:48:53 UTC (rev 4831) +++ branches/BRANCH_1_1_0/mantisbt/core/email_api.php 2007-12-17 00:24:56 UTC (rev 4832) @@ -726,7 +726,11 @@ } # @@@ should this be the current language (for the recipient) or the default one (for the user running the command) (thraxisp) - $mail->SetLanguage( lang_get( 'phpmailer_language', config_get( 'default_language' ) ), PHPMAILER_PATH . 'language' . DIRECTORY_SEPARATOR ); + $t_lang = config_get( 'default_language' ); + if ( 'auto' == $t_lang ) { + $t_lang = config_get( 'fallback_language'); + } + $mail->SetLanguage( lang_get( 'phpmailer_language', $t_lang ), PHPMAILER_PATH . 'language' . DIRECTORY_SEPARATOR ); # Select the method to send mail switch ( config_get( 'phpMailer_method' ) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |