Changeset 1676
- Timestamp:
- Dec 19, 2006, 11:05:01 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_notification_by_mail.inc.php
r1645 r1676 313 313 function get_mail_content_subscribe_unsubcribe($nbm_user) 314 314 { 315 global $ page, $env_nbm;315 global $env_nbm; 316 316 317 317 $content = "\n\n\n"; 318 318 319 if ( isset($page['root_path']) ) 320 { 321 $save_root_path = $page['root_path']; 322 } 323 324 $page['root_path'] = 'http://'.$_SERVER['HTTP_HOST'].cookie_path(); 319 set_make_full_url(); 325 320 326 321 $content .= "___________________________________________________\n\n"; … … 330 325 $content .= "___________________________________________________\n\n\n\n"; 331 326 332 if (isset($save_root_path)) 333 { 334 $page['root_path'] = $save_root_path; 335 } 336 else 337 { 338 unset($page['root_path']); 339 } 327 unset_make_full_url(); 340 328 341 329 return $content; -
trunk/include/functions_mail.inc.php
r1645 r1676 122 122 function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '', $format_infos = 'text/plain', $email_format = null) 123 123 { 124 global $conf, $conf_mail, $lang_info, $user ;124 global $conf, $conf_mail, $lang_info, $user, $page; 125 125 126 126 $cvt7b_subject = str_translate_to_ascii7bits($subject); … … 140 140 // Todo find function to convert html text to plain text 141 141 return false; 142 } 143 144 // Compute root_path in order have complete path 145 if ($email_format == 'text/html') 146 { 147 set_make_full_url(); 142 148 } 143 149 … … 180 186 181 187 'CONTENT_ENCODING' => $lang_info['charset'], 182 'LANG'=>$lang_info['code'], 183 'DIR'=>$lang_info['direction'] 184 188 'LANG' => $lang_info['code'], 189 'DIR' => $lang_info['direction'] 185 190 )); 186 191 … … 221 226 'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '', 222 227 223 ' L_TITLE_MAIL' => urlencode(l10n('title_send_mail')),228 'TITLE_MAIL' => urlencode(l10n('title_send_mail')), 224 229 'MAIL' => get_webmaster_mail_address() 225 230 )); … … 235 240 236 241 $content.= $conf_mail[$email_format][$lang_info['charset']]['footer']; 242 243 // Undo Compute root_path in order have complete path 244 if ($email_format == 'text/html') 245 { 246 unset_make_full_url(); 247 } 237 248 238 249 if ($conf_mail['mail_options']) -
trunk/include/functions_url.inc.php
r1566 r1676 397 397 return $section_string; 398 398 } 399 400 /** 401 * Indicate to build url with full path 402 * 403 * @param null 404 * @return null 405 */ 406 function set_make_full_url() 407 { 408 global $page; 409 410 if (!isset($page['save_root_path'])) 411 { 412 if (isset($page['root_path'])) 413 { 414 $page['save_root_path']['path'] = $page['root_path']; 415 } 416 $page['save_root_path']['count'] = 1; 417 $page['root_path'] = 'http://'.$_SERVER['HTTP_HOST'].cookie_path(); 418 } 419 else 420 { 421 $page['save_root_path']['count'] += 1; 422 } 423 } 424 425 /** 426 * Restore old parameter to build url with full path 427 * 428 * @param null 429 * @return null 430 */ 431 function unset_make_full_url() 432 { 433 global $page; 434 435 if (isset($page['save_root_path'])) 436 { 437 if ($page['save_root_path']['count'] == 1) 438 { 439 if (isset($page['save_root_path']['path'])) 440 { 441 $page['root_path'] = $page['save_root_path']['path']; 442 } 443 else 444 { 445 unset($page['root_path']); 446 } 447 unset($page['save_root_path']); 448 } 449 else 450 { 451 $page['save_root_path']['count'] -= 1; 452 } 453 } 454 } 455 399 456 ?> -
trunk/template/yoga/mail/footer.tpl
r1645 r1676 6 6 7 7 <a href="{GALLERY_URL}" class="back">{GALLERY_TITLE}</a> - 8 {lang:powered_by} <a href="http://www.phpwebgallery.net" class="back">PhpWebGallery</a> 8 <a href="http://www.phpwebgallery.net" class="back" title="{lang:powered_by}"> 9 <img src="{pwg_root}{themeconf:icon_dir}/pwg_footer.png" alt="{lang:powered_by}"> 10 </a> 9 11 {VERSION} 10 12 - {lang:send_mail} 11 <a href="mailto:{MAIL}?subject={ L_TITLE_MAIL}">{lang:Webmaster}</a>13 <a href="mailto:{MAIL}?subject={TITLE_MAIL}">{lang:Webmaster}</a> 12 14 13 15 </div> <!-- copyright -->
Note: See TracChangeset
for help on using the changeset viewer.