- Timestamp:
- Nov 29, 2012, 3:57:32 PM (12 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r18967 r19225 903 903 * 904 904 * @param string key: translation key 905 * @param array/string/../number args: 906 * arguments to use on sprintf($key, args) 905 * @param mixed args: arguments to use on sprintf($key, args) 907 906 * if args is a array, each values are used on sprintf 908 907 * @return string … … 922 921 923 922 /* 924 * returns a string with formated with l10n_args elements 925 * 926 * @param element/array $key_args: element or array of l10n_args elements 927 * @param $sep: if $key_args is array, 928 * separator is used when translated l10n_args elements are concated 923 * returns a string formated with l10n elements 924 * 925 * @param array $key_args: l10n_args element or array of l10n_args elements 926 * @param string $sep: used when translated elements are concatened 929 927 * @return string 930 928 */ … … 946 944 if ($key === 'key_args') 947 945 { 948 array_unshift($element, l10n(array_shift($element))); 946 array_unshift($element, l10n(array_shift($element))); // translate the key 949 947 $result .= call_user_func_array('sprintf', $element); 950 948 } -
trunk/include/functions_mail.inc.php
r12922 r19225 64 64 * Returns an array of mail configuration parameters : 65 65 * 66 * - mail_options: see $conf['mail_options'] 67 * - send_bcc_mail_webmaster: see $conf['send_bcc_mail_webmaster'] 68 * - email_webmaster: mail corresponding to $conf['webmaster_id'] 69 * - formated_email_webmaster: the name of webmaster is $conf['gallery_title'] 70 * - text_footer: Piwigo and version 66 * - mail_options 67 * - send_bcc_mail_webmaster 68 * - default_email_format 69 * - alternative_email_format 70 * - use_smtp 71 * - smtp_host 72 * - smtp_user 73 * - smtp_password 74 * - boundary_key 75 * - email_webmaster 76 * - formated_email_webmaster 71 77 * 72 78 * @return array … … 84 90 'smtp_host' => $conf['smtp_host'], 85 91 'smtp_user' => $conf['smtp_user'], 86 'smtp_password' => $conf['smtp_password'] 92 'smtp_password' => $conf['smtp_password'], 93 'boundary_key' => generate_key(32), 87 94 ); 88 95 … … 93 100 $conf_mail['formated_email_webmaster'] = 94 101 format_email(get_mail_sender_name(), $conf_mail['email_webmaster']); 95 96 $conf_mail['boundary_key'] = generate_key(32);97 102 98 103 return $conf_mail; … … 148 153 } 149 154 150 return implode(',', $result);155 return implode(',', array_unique($result)); 151 156 } 152 157 … … 155 160 * Return an new mail template 156 161 * 157 * @params: 158 * - email_format: mail format 159 * - args: function params of mail function: 160 * o template: template to use [default get_default_theme()] 161 * o theme: template to use [default get_default_theme()] 162 * @param string email_format: mail format, text/html or text/plain 163 * @param string theme: theme to use [default get_default_theme()] 162 164 */ 163 165 function & get_mail_template($email_format, $theme='') … … 174 176 175 177 /** 176 * Return string email format ( html or not)178 * Return string email format (text/html or text/plain) 177 179 * 178 180 * @param string format … … 275 277 * - keyargs_subject: mail subject on l10n_args format 276 278 * - keyargs_content: mail content on l10n_args format 279 * - send_technical_details: send user IP and browser 277 280 * 278 281 * @return boolean (Ok or not) … … 318 321 if (count($admins) > 0) 319 322 { 320 $keyargs_content_admin_info = array(321 get_l10n_args('Connected user: %s', stripslashes($user['username'])),322 get_l10n_args('IP: %s', $_SERVER['REMOTE_ADDR']),323 get_l10n_args('Browser: %s', $_SERVER['HTTP_USER_AGENT'])324 );325 326 323 switch_lang_to(get_default_language()); 327 324 … … 329 326 if ($send_technical_details) 330 327 { 328 $keyargs_content_admin_info = array( 329 get_l10n_args('Connected user: %s', stripslashes($user['username'])), 330 get_l10n_args('IP: %s', $_SERVER['REMOTE_ADDR']), 331 get_l10n_args('Browser: %s', $_SERVER['HTTP_USER_AGENT']) 332 ); 333 331 334 $content.= "\n".l10n_args($keyargs_content_admin_info)."\n"; 332 335 } … … 355 358 * - email_format: mail format 356 359 * - keyargs_subject: mail subject on l10n_args format 357 * - dirname: short name of directory including template358 360 * - tpl_shortname: short template name without extension 359 361 * - assign_vars: array used to assign_vars to mail template
Note: See TracChangeset
for help on using the changeset viewer.