Ignore:
Timestamp:
May 20, 2011, 10:21:46 PM (13 years ago)
Author:
Eric
Message:
  • Use pwg_db_real_escape_string() instead of addslashes()
  • Database upgrade process simplied (using version_compare() and code refactoring)
  • Bug 2253 fixed - New feature to allow comments on pictures only for specific users (who belong to a group) when "comments for all" is set
File:
1 edited

Legend:

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

    r10942 r10957  
    106106  case 'global':
    107107
    108         if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']))
     108        if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_GroupComm']))
    109109  {
    110110
     
    179179      $_POST['UAM_USRAutoMail'],
    180180      $_POST['UAM_Stuffs'],
    181       $_POST['UAM_HidePassw']
     181      $_POST['UAM_HidePassw'],
     182      $_POST['UAM_GroupComm'],
     183      (isset($_POST['UAM_AllowComm_Group'])?$_POST['UAM_AllowComm_Group']:''),
    182184      );
    183185
     
    257259  $Valid = -1;
    258260  $Downgrade = -1;
     261  $AllowComm = -1;
    259262       
    260263  //Check groups list in database
     
    284287                {
    285288                $Downgrade = $row['id'];
     289                }
     290    //configuration value for users group allowed to post comments
     291    if (isset($conf_UAM[37]) and $conf_UAM[37] == $row['id'])
     292                {
     293                $AllowComm = $row['id'];
    286294                }
    287295  }
     
    309317      'group_options'=> $groups,
    310318      'group_selected' => $Downgrade
     319                        )
     320        );
     321  //Template initialization for allowed group for comments
     322  $template->assign(
     323    'AllowComm_Group',
     324                array(
     325      'group_options'=> $groups,
     326      'group_selected' => $AllowComm
    311327                        )
    312328        );
     
    449465    'UAM_HIDEPASSW_TRUE'             => $conf_UAM[35]=='true' ?  'checked="checked"' : '' ,
    450466    'UAM_HIDEPASSW_FALSE'            => $conf_UAM[35]=='false' ?  'checked="checked"' : '' ,
     467    'UAM_GROUPCOMM_TRUE'             => $conf_UAM[36]=='true' ?  'checked="checked"' : '' ,
     468    'UAM_GROUPCOMM_FALSE'            => $conf_UAM[36]=='false' ?  'checked="checked"' : '' ,
     469    'UAM_ALLOWCOMM_GROUP'            => $conf_UAM[37],
    451470                'UAM_PASSWORD_TEST_SCORE'        => $UAM_Password_Test_Score,
    452471    'UAM_ERROR_REPORTS4'             => $UAM_Exclusionlist_Error,
Note: See TracChangeset for help on using the changeset viewer.