Ignore:
Timestamp:
Aug 21, 2013, 10:12:50 PM (11 years ago)
Author:
Eric
Message:

r24212 merged from trunk to branch 2.50Next version is 2.5.14:
Evolution 2951 fixed - Add an option to add the gallery URL at the end of emails sent by UAM
Update ru_RU, thanks to : Konve
Update lv_LV, thanks to : agrisans
Add pt_PT, thanks to : ANO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.50/include/functions.inc.php

    r23903 r24213  
    13741374        elseif ((isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true') and $confirm)
    13751375        {
    1376     pwg_mail($email, array(
    1377       'subject' => $subject,
    1378         'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
    1379     ));
     1376          // Adding gallery URL at the end of the email
     1377    if (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'true')
     1378    {
     1379      pwg_mail($email, array(
     1380        'subject' => $subject,
     1381         'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
     1382      ));
     1383    }
     1384    // Do not add gallery URL at the end of the email
     1385    elseif (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'false')
     1386    {
     1387      pwg_mail($email, array(
     1388        'subject' => $subject,
     1389         'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : ""),
     1390      ));
     1391    }
     1392    // By default do not add gallery URL at the end of the email
     1393    else
     1394    {
     1395      pwg_mail($email, array(
     1396        'subject' => $subject,
     1397         'content' => (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : ""),
     1398      ));
     1399    }
    13801400        }
    13811401// Switching back to default language
     
    15971617    break;
    15981618        }
    1599  
    1600   pwg_mail($email, array(
    1601     'subject' => $subject,
    1602     'content' => ($infos1."\n\n").(isset($infos2) ? l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
    1603   ));
    1604 
    1605                 // Switching back to default language
    1606                 // ----------------------------------
    1607                 switch_lang_back();
     1619
     1620  // Adding gallery URL at the end of the email
     1621  if (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'true')
     1622  {
     1623    UAMLog(get_absolute_root_url(),'','','');
     1624    pwg_mail($email, array(
     1625      'subject' => $subject,
     1626      'content' => ($infos1."\n\n").(isset($infos2) ? l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),
     1627    ));
     1628  }
     1629  // Do not add gallery URL at the end of the email
     1630  elseif (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'false')
     1631  {
     1632    pwg_mail($email, array(
     1633      'subject' => $subject,
     1634      'content' => ($infos1."\n\n").(isset($infos2) ? l10n_args($infos2)."\n\n" : ""),
     1635    ));
     1636  }
     1637  // By default do not add gallery URL at the end of the email
     1638  else
     1639  {
     1640    pwg_mail($email, array(
     1641      'subject' => $subject,
     1642      'content' => ($infos1."\n\n").(isset($infos2) ? l10n_args($infos2)."\n\n" : ""),
     1643    ));
     1644  }
     1645
     1646  // Switching back to default language
     1647        // ----------------------------------
     1648        switch_lang_back();
    16081649}
    16091650
     
    16811722  }
    16821723
    1683   pwg_mail($email, array(
    1684     'subject' => $subject,
    1685     'content' => $infos1.get_absolute_root_url(),
    1686   ));
    1687 
    1688                 // Switching back to default language
    1689                 // ----------------------------------
    1690                 switch_lang_back();
     1724  // Adding gallery URL at the end of the email
     1725  if (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'true')
     1726  {
     1727    pwg_mail($email, array(
     1728      'subject' => $subject,
     1729      'content' => $infos1.get_absolute_root_url(),
     1730    ));
     1731  }
     1732  // Do not add gallery URL at the end of the email
     1733  elseif (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'false')
     1734  {
     1735    pwg_mail($email, array(
     1736      'subject' => $subject,
     1737      'content' => $infos1,
     1738    ));
     1739  }
     1740  // By default do not add gallery URL at the end of the email
     1741  else
     1742  {
     1743    pwg_mail($email, array(
     1744      'subject' => $subject,
     1745      'content' => $infos1,
     1746    ));
     1747  }
     1748
     1749  // Switching back to default language
     1750        // ----------------------------------
     1751        switch_lang_back();
    16911752}
    16921753
     
    17871848// Sending the email with subject and contents
    17881849// -------------------------------------------
    1789   pwg_mail($email, array(
    1790     'subject' => $subject,
    1791     'content' => ($custom_txt.l10n_args($infos1)."\n\n".l10n_args($infos2)."\n\n").get_absolute_root_url(),
    1792   ));
     1850  // Adding gallery URL at the end of the email
     1851  if (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'true')
     1852  {
     1853    pwg_mail($email, array(
     1854      'subject' => $subject,
     1855      'content' => ($custom_txt.l10n_args($infos1)."\n\n".l10n_args($infos2)."\n\n").get_absolute_root_url(),
     1856    ));
     1857  }
     1858  // Do not add gallery URL at the end of the email
     1859  elseif (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'false')
     1860  {
     1861    pwg_mail($email, array(
     1862      'subject' => $subject,
     1863      'content' => ($custom_txt.l10n_args($infos1)."\n\n".l10n_args($infos2)."\n\n"),
     1864    ));
     1865  }
     1866  // By default do not add gallery URL at the end of the email
     1867  else
     1868  {
     1869    pwg_mail($email, array(
     1870      'subject' => $subject,
     1871      'content' => ($custom_txt.l10n_args($infos1)."\n\n".l10n_args($infos2)."\n\n"),
     1872    ));
     1873  }
    17931874
    17941875                // Switching back to default language
     
    18941975// Sending the email with subject and contents
    18951976// -------------------------------------------
    1896   pwg_mail($result['mail_address'], array(
    1897     'subject' => $subject,
    1898     'content' => (l10n_args($infos)."\n\n".$custom_txt),
    1899   ));
    1900 
    1901                 // Switching back to default language
    1902                 // ----------------------------------
    1903                 switch_lang_back();
     1977  // Adding gallery URL at the end of the email
     1978  if (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'true')
     1979  {
     1980    pwg_mail($result['mail_address'], array(
     1981      'subject' => $subject,
     1982      'content' => (l10n_args($infos)."\n\n".$custom_txt).get_absolute_root_url(),
     1983    ));
     1984  }
     1985  // Do not add gallery URL at the end of the email
     1986  elseif (isset($conf_UAM['ADD_GALLERY_URL_TO_EMAILS']) and $conf_UAM['ADD_GALLERY_URL_TO_EMAILS'] == 'false')
     1987  {
     1988    pwg_mail($result['mail_address'], array(
     1989      'subject' => $subject,
     1990      'content' => (l10n_args($infos)."\n\n".$custom_txt),
     1991    ));
     1992  }
     1993  // By defaukt do not add gallery URL at the end of the email
     1994  else
     1995  {
     1996    pwg_mail($result['mail_address'], array(
     1997      'subject' => $subject,
     1998      'content' => (l10n_args($infos)."\n\n".$custom_txt),
     1999    ));
     2000  }
     2001
     2002  // Switching back to default language
     2003        // ----------------------------------
     2004        switch_lang_back();
    19042005}
    19052006
Note: See TracChangeset for help on using the changeset viewer.