Changeset 21633


Ignore:
Timestamp:
Mar 17, 2013, 2:08:54 PM (7 years ago)
Author:
Eric
Message:

merge r21598, r21606, r21611 and r21612 from trunk to branch 2.50

Location:
extensions/UserAdvManager/branches/2.50
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.50/admin/UAM_admin.php

    r21075 r21633  
    183183      $UAM_Illegal_Flag_Error1 = true;
    184184      array_push($page['errors'], l10n('UAM_Error_Using_illegal_Kdays'));
     185    }
     186
     187    // Check if VALIDATED_GROUP is set as the gallery's default group and set it as default if not
     188    // Experimental : It's better the "validated users" group is the gallery's default group
     189    // -------------------------------------------------------------------------------------------
     190    if (isset($_POST['UAM_Validated_Group']) and $_POST['UAM_Validated_Group'] <> '-1')
     191    {
     192      $query = '
     193SELECT name, is_default
     194FROM '.GROUPS_TABLE.'
     195WHERE id = '.$_POST['UAM_Validated_Group'].'
     196;';
     197
     198      $UAM_group = pwg_db_fetch_assoc(pwg_query($query));
     199
     200      if (isset($UAM_group['is_default']) and $UAM_group['is_default'] == "false")
     201      {
     202        $query = '
     203UPDATE '.GROUPS_TABLE.'
     204SET is_default = true
     205WHERE id = '.$_POST['UAM_Validated_Group'].'
     206;';
     207        pwg_query($query);
     208
     209        array_push(
     210          $page['infos'],
     211          sprintf(l10n('UAM_group "%s" updated'), $UAM_group['name'])
     212        );
     213      }
    185214    }
    186215
     
    13361365          'GROUPS'           => $groups_string,
    13371366          'REGISTRATION'     => $local_user['registration_date'],
    1338           'REMINDER'         => $reminder,    
     1367          'REMINDER'         => $reminder,   
    13391368          'EXPIRATION'       => $expiration,
    13401369        )
  • extensions/UserAdvManager/branches/2.50/admin/template/ghosttracker.tpl

    r18799 r21633  
    109109                {/if}
    110110</form>
    111 
    112 {html_head}
    113 <script type="text/javascript">
    114 jQuery(document).ready(function() {ldelim}
    115   jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
    116         jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
    117         //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);
    118 });
    119 </script>
    120 {/html_head}
  • extensions/UserAdvManager/branches/2.50/admin/template/global.tpl

    r18999 r21633  
    969969   uam_blockToggleDisplay(n1,n2);
    970970{/literal}{/footer_script}
    971 
    972 {html_head}
    973 <script type="text/javascript">
    974 jQuery(document).ready(function() {ldelim}
    975   jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
    976         jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
    977         //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);
    978 });
    979 </script>
    980 {/html_head}
  • extensions/UserAdvManager/branches/2.50/admin/template/usermanager.tpl

    r18799 r21633  
    112112    {/if}
    113113</form>
    114 
    115 {html_head}
    116 <script type="text/javascript">
    117 jQuery(document).ready(function() {ldelim}
    118   jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
    119         jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
    120         //jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);
    121 });
    122 </script>
    123 {/html_head}
  • extensions/UserAdvManager/branches/2.50/changelog.txt.php

    r21520 r21633  
    398398            Update tr_TR, thanks to : LazBoy
    399399            Update it_IT, thanks to : Ericnet
    400            
     400
     401-- 2.50.3 : Bug 2870 fixed - Error in tracking confirmation tab if $conf['default_user_id'] is set with an ID different than Guest user ID
     402            Bug 2871 fixed - Improved process : User registration is confirmed by default when user is added by an admin and confirmation of registration for admins is set to OFF
     403            Bug 2872 fixed - Check if confirmed users group is set as the default group and set it if not
     404            Bug 2873 fixed - Remove annoying flashing message on config submit
    401405*/
    402406?>
  • extensions/UserAdvManager/branches/2.50/include/functions.inc.php

    r21520 r21633  
    23032303
    23042304                                                // Set UAM_validated field to True in #_users table
    2305                                                 $query = '
    2306 UPDATE '.USERS_TABLE.'
    2307 SET UAM_validated = "true"
    2308 WHERE id = '.$data['user_id'].'
    2309 ;';
    2310                                                 pwg_query($query);
     2305            SetValidated($data['user_id']);
    23112306
    23122307                                                // Refresh user's category cache
     
    23952390
    23962391          // Set UAM_validated field to True in #_users table
    2397           $query = '
    2398 UPDATE '.USERS_TABLE.'
    2399 SET UAM_validated = "true"
    2400 WHERE id = '.$data['user_id'].'
    2401 ;';
    2402           pwg_query($query);
     2392          SetValidated($data['user_id']);
    24032393
    24042394          // Refresh user's category cache
     
    24932483
    24942484                // Set UAM_validated field to True in #_users table
    2495                 $query = '
    2496 UPDATE '.USERS_TABLE.'
    2497 SET UAM_validated = "true"
    2498 WHERE id = '.$id.'
    2499 ;';
    2500                 pwg_query($query);
     2485                SetValidated($data['user_id']);
    25012486}
    25022487
     
    26292614    ON u.'.$conf['user_fields']['id'].' = ug.user_id
    26302615WHERE u.'.$conf['user_fields']['id'].' >= 3
     2616  AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    26312617  AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'"
    26322618  OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'")
     
    27042690    ON u.'.$conf['user_fields']['id'].' = ui.user_id
    27052691WHERE u.'.$conf['user_fields']['id'].' >= 3
     2692  AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    27062693  AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'")
    27072694ORDER BY ui.registration_date ASC;';
     
    27442731    ON u.'.$conf['user_fields']['id'].' = lv.user_id
    27452732WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM['GHOSTRACKER_DAYLIMIT'].'")
     2733AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    27462734ORDER BY lv.lastvisit ASC;';
    27472735
     
    27912779    ON u.'.$conf['user_fields']['id'].' = lv.user_id
    27922780WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM['GHOSTRACKER_DAYLIMIT'].'")
     2781AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    27932782ORDER BY lv.lastvisit ASC;';
    27942783
     
    28272816    ON u.'.$conf['user_fields']['id'].' = ug.user_id
    28282817WHERE u.'.$conf['user_fields']['id'].' >= 3
     2818  AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    28292819  AND u.username NOT LIKE "16"
    28302820  AND u.username NOT LIKE "18"
     
    30863076  $result = pwg_db_fetch_assoc(pwg_query($query));
    30873077
    3088   if($result['UAM_validated'] == 'true')
     3078  if($result['UAM_validated'] == 'true' or is_null($result['UAM_validated']))
    30893079  {
    30903080    return true;
     
    31043094UPDATE '.USERS_TABLE.'
    31053095SET UAM_validated = "false"
     3096WHERE id = '.$user_id.'
     3097LIMIT 1
     3098;';
     3099
     3100  pwg_query($query);
     3101}
     3102
     3103
     3104/**
     3105 * SetValidated
     3106 * Set UAM_validated field to true in #_users table
     3107 *
     3108 **/
     3109function SetValidated($user_id)
     3110{
     3111  $query ='
     3112UPDATE '.USERS_TABLE.'
     3113SET UAM_validated = "true"
    31063114WHERE id = '.$user_id.'
    31073115LIMIT 1
  • extensions/UserAdvManager/branches/2.50/language/en_UK/plugin.lang.php

    r19234 r21633  
    424424$lang['UAM_Customize_messagesandmails'] = 'Customize the messages and mails';
    425425$lang['UAM_Change'] = 'Change the Group/Status/Privacy Level of the users who have been confirmed';
    426 
    427426// --------- End: New or revised $lang ---- from version 2.41.0
     427
     428$lang['UAM_group "%s" updated'] = 'For best performance, the group %s was automatically set as the default group.';
    428429?>
  • extensions/UserAdvManager/branches/2.50/language/fr_FR/plugin.lang.php

    r21075 r21633  
    426426$lang['UAM_Change'] = 'Changer l\'utilisateur confirmé de Groupe/Statut/Niveau de confidentialité';
    427427// --------- End: New or revised $lang ---- from version 2.41.0
     428
     429$lang['UAM_group "%s" updated'] = 'Pour un meilleur fonctionnement, le groupe %s a été automatiquement positionné comme groupe par défault.';
    428430?>
Note: See TracChangeset for help on using the changeset viewer.