Changeset 24371


Ignore:
Timestamp:
Sep 9, 2013, 9:19:17 PM (11 years ago)
Author:
Eric
Message:

Next version is 2.50.13 :
Bug 2958 fixed - Only one user group can be set as default group. Unicity check when a group is set for validated users.
Update el_GR, thanks to : bas_alba
Update da_DK, thanks to : Kaare

Location:
extensions/UserAdvManager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r24212 r24371  
    190190    if (isset($_POST['UAM_Validated_Group']) and $_POST['UAM_Validated_Group'] <> '-1')
    191191    {
     192      // Unset old group as group by default
    192193      $query = '
    193 SELECT name, is_default
     194UPDATE '.GROUPS_TABLE.'
     195SET is_default = \''.boolean_to_string(false).'\'
     196WHERE is_default = true
     197;';
     198      pwg_query($query);
     199
     200      // Set the new group as group by default
     201      $query = '
     202SELECT name
    194203FROM '.GROUPS_TABLE.'
    195204WHERE id = '.$_POST['UAM_Validated_Group'].'
     
    198207      $UAM_group = pwg_db_fetch_assoc(pwg_query($query));
    199208
    200       if (isset($UAM_group['is_default']) and $UAM_group['is_default'] == "false")
    201       {
    202         $query = '
     209      $query = '
    203210UPDATE '.GROUPS_TABLE.'
    204 SET is_default = true
     211SET is_default = \''.boolean_to_string(true).'\'
    205212WHERE id = '.$_POST['UAM_Validated_Group'].'
    206213;';
    207         pwg_query($query);
    208 
    209         array_push(
    210           $page['infos'],
    211           sprintf(l10n('UAM_group "%s" updated'), $UAM_group['name'])
    212         );
    213       }
     214      pwg_query($query);
     215
     216      array_push(
     217        $page['infos'],
     218        sprintf(l10n('UAM_group "%s" updated'), $UAM_group['name'])
     219      );
    214220    }
    215221
  • extensions/UserAdvManager/trunk/changelog.txt.php

    r24306 r24371  
    451451             Update de_DE, thanks to : Joergen
    452452             Update lv_LV, thanks to : agrisans
     453
     454-- 2.50.13 : Bug 2958 fixed - Only one user group can be set as default group. Unicity check when a group is set for validated users.
     455             Update da_DK, thanks to : Kaare
     456             Update el_GR, thanks to : bas_alba
     457             
    453458*/
    454459?>
Note: See TracChangeset for help on using the changeset viewer.