Changeset 4281


Ignore:
Timestamp:
Nov 16, 2009, 9:09:33 PM (15 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Bug 1238 fixed - Simple custom email text wasn't send when Extended Description plugin wasn't set.
  • Ending of IT translations
Location:
extensions/NBC_UserAdvManager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php

    r4185 r4281  
    1818  {
    1919    case 1:
    20       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Add of %s', $username));
     20      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Add of %s', stripslashes($username)));
    2121      $password = $password <> '' ? $password : l10n('UserAdvManager_empty_pwd');
    2222     
    23       if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '')
    24         $infos1_perso = get_user_language_desc($conf_nbc_UserAdvManager[10])."\n\n";
     23      if (isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '')
     24      {
     25        if (function_exists('get_user_language_desc'))
     26        {
     27          $infos1_perso = get_user_language_desc($conf_nbc_UserAdvManager[10])."\n\n";
     28        }
     29        else $infos1_perso = l10n($conf_nbc_UserAdvManager[10])."\n\n";
     30      }
    2531     
    2632      break;
    2733     
    2834    case 2:
    29       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', $username));
     35      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', stripslashes($username)));
    3036      $password = $password <> '' ? $password : l10n('UserAdvManager_empty_pwd');
    3137
     
    3339       
    3440    case 3:
    35       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', $username));
     41      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', stripslashes($username)));
    3642      $password = $password <> '' ? $password : l10n('UserAdvManager_no_update_pwd');
    3743
     
    4248  {
    4349    $infos1 = array(
    44       get_l10n_args('infos_mail %s', $username),
    45       get_l10n_args('User: %s', $username),
     50      get_l10n_args('infos_mail %s', stripslashes($username)),
     51      get_l10n_args('User: %s', stripslashes($username)),
    4652      get_l10n_args('Password: %s', $password),
    4753      get_l10n_args('Email: %s', $email),
     
    5965    );
    6066
    61     if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '')
    62       $infos2_perso = get_user_language_desc($conf_nbc_UserAdvManager[11])."\n\n";
     67    if (isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '')
     68    {
     69      if (function_exists('get_user_language_desc'))
     70      {
     71        $infos2_perso = get_user_language_desc($conf_nbc_UserAdvManager[11])."\n\n";
     72      }
     73      else $infos2_perso = l10n($conf_nbc_UserAdvManager[11])."\n\n";
     74    }
    6375  }
    6476
     
    106118  {
    107119    case 1:
    108       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_with_key_of_%s', $username));
    109      
    110       if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and $confirm)
     120      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_with_key_of_%s', stripslashes($username)));
     121     
     122      if (isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and $confirm)
    111123      {
    112                                 $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
    113                        
    114                                 $infos2 = array
    115                                 (
    116                                         get_l10n_args('Link: %s', ResetConfirmMail($user_id)),
    117                                         get_l10n_args('', ''),
    118                                 );
     124        if (function_exists('get_user_language_desc'))
     125        {
     126          $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
     127        }
     128                                else $infos1 = l10n($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
     129
     130        $infos2 = array
     131        (
     132          get_l10n_args('Link: %s', ResetConfirmMail($user_id)),
     133          get_l10n_args('', ''),
     134        );       
    119135                        }
     136     
    120137                break;
    121138     
    122139    case 2:
    123       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_without_key_of_%s', $username));
    124      
    125       if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and !$confirm)
     140      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Reminder_without_key_of_%s', stripslashes($username)));
     141     
     142      if (isset($conf_nbc_UserAdvManager_ConfirmMail[2]) and $conf_nbc_UserAdvManager_ConfirmMail[2] <> '' and isset($conf_nbc_UserAdvManager_ConfirmMail[3]) and $conf_nbc_UserAdvManager_ConfirmMail[3] == 'true' and !$confirm)
    126143      {
    127                                 $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
     144        if (function_exists('get_user_language_desc'))
     145        {
     146          $infos1 = get_user_language_desc($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";
     147        }
     148        else $infos1 = l10n($conf_nbc_UserAdvManager_ConfirmMail[2])."\n\n";                           
    128149      }
     150     
    129151    break;
    130152        }
     153 
    131154  pwg_mail($email, array(
    132155    'subject' => $subject,
     
    155178        $infos1_perso = "";
    156179
    157   $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_remainder_of_%s', $username));
    158      
    159   if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[19]) and $conf_nbc_UserAdvManager[19] <> '' and isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true')
    160   {
    161     $infos1 = get_user_language_desc($conf_nbc_UserAdvManager[19])."\n\n";
     180  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_remainder_of_%s', stripslashes($username)));
     181     
     182  if (isset($conf_nbc_UserAdvManager[19]) and $conf_nbc_UserAdvManager[19] <> '' and isset($conf_nbc_UserAdvManager[17]) and $conf_nbc_UserAdvManager[17] == 'true')
     183  {
     184    if (function_exists('get_user_language_desc'))
     185    {
     186      $infos1 = get_user_language_desc($conf_nbc_UserAdvManager[19])."\n\n";
     187    }
     188    else $infos1 = l10n($conf_nbc_UserAdvManager[19])."\n\n";
     189   
    162190    resetlastvisit($user_id);
    163191  }
     
    588616    list($username) = mysql_fetch_row(pwg_query($query));
    589617
    590     return isset($username) ? $username : '';
     618    return isset($username) ? stripslashes($username) : '';
    591619  }
    592620}
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r4249 r4281  
    22/*
    33Plugin Name: NBC UserAdvManager
    4 Version: 2.12.6
     4Version: 2.12.7
    55Description: Renforcer les possibilités de gestion des utilisateurs - Enforce users management
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
     
    9999-- 2.12.6 : Bug 1236 fixed -  Admins was unable to add a new user in the user_list page.
    100100            Beginning of IT translations
     101           
     102-- 2.12.7 : Bug 1238 fixed -  Simple custom email text wasn't send when Extended Description plugin wasn't set.
     103            Ending of IT translations
    101104*/
    102105
Note: See TracChangeset for help on using the changeset viewer.