Ignore:
Timestamp:
May 28, 2010, 9:55:03 PM (14 years ago)
Author:
rvelices
Message:
  • merged the linkroot integration with the existing gallery_url (unique $confgallery_url used for RSS, mail homepage root in the browse path)
  • added an option $confdebug_mail - if set all outgoing mails are saved into local_data_dir
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/functions_mail.inc.php

    r6364 r6410  
    151151}
    152152
    153 /**
    154  * Returns an completed array template/theme
    155  * completed with get_default_theme()
    156  *
    157  * @params:
    158  *   - args: incompleted array of template/theme
    159  *       o template: template to use [default get_default_theme()]
    160  *       o theme: template to use [default get_default_theme()]
    161  */
    162 function get_array_template_theme($args = array())
    163 {
    164   global $conf;
    165 
    166   $res = array();
    167 
    168   if (empty($args['template']) or empty($args['theme']))
    169   {
    170     list($res['template'], $res['theme']) = explode('/', get_default_theme());
    171   }
    172 
    173   if (!empty($args['template']))
    174   {
    175     $res['template'] = $args['template'];
    176   }
    177 
    178   if (!empty($args['theme']))
    179   {
    180     $res['theme'] = $args['theme'];
    181   }
    182 
    183   return $res;
    184 }
    185153
    186154/**
     
    642610
    643611          // Footer
    644           'GALLERY_URL' =>
    645             isset($page['gallery_url']) ?
    646                   $page['gallery_url'] : $conf['gallery_url'],
     612          'GALLERY_URL' => get_gallery_home_url(),
    647613          'GALLERY_TITLE' =>
    648614            isset($page['gallery_title']) ?
     
    829795
    830796/*Testing block*/
    831 /*function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args)
     797function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args)
    832798{
    833799    global $conf, $user, $lang_info;
     
    835801    if ( mkgetdir( $dir,  MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR) )
    836802    {
    837       $filename = $dir.'/mail.'.stripslashes($user['username']).'.'.$lang_info['code'].'.'.$args['template'].'.'.$args['theme'];
     803      $filename = $dir.'/mail.'.stripslashes($user['username']).'.'.$lang_info['code'].'.'.$args['theme'].'-'.date('YmdHis');
    838804      if ($args['content_format'] == 'text/plain')
    839805      {
     
    853819    return $result;
    854820}
    855 add_event_handler('send_mail', 'pwg_send_mail_test', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 6);*/
     821if ($conf['debug_mail'])
     822  add_event_handler('send_mail', 'pwg_send_mail_test', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 6);
    856823
    857824
Note: See TracChangeset for help on using the changeset viewer.