Changeset 884 for trunk/Modules/User


Ignore:
Timestamp:
Apr 8, 2020, 7:27:09 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Error during user registration.
  • Fixed: Error on user enter to new team.
Location:
trunk/Modules/User
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/Options.php

    r880 r884  
    5353        '</form>';
    5454
    55     $Output .= '  <fieldset><legend>'.T('Translation team').'</legend>';
     55    $Output .= '<fieldset><legend>'.T('Translation team').'</legend>';
    5656    $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `Team`');
    57     $Output .= '<a href="team/?action=create">'.T('Create team').'</a><br />'.
    58         '<a href="team/?action=leave">'.T('Leave team').'</a><br />'.
    59         '<br /><form action="team/" method="get">'.
     57    $Output .= '<a href="'.$this->System->Link('/team/?action=create').'">'.T('Create team').'</a><br />'.
     58        '<a href="'.$this->System->Link('/team/?action=leave').'">'.T('Leave team').'</a><br />'.
     59        '<br /><form action="'.$this->System->Link('/team/').'" method="get">'.
    6060        '<input type="hidden" name="action" value="gointeam"/>'.
    6161        '<select name="id">';
     
    6666      $Output .= '>'.htmlspecialchars($LineTeam['Name']).'</option>';
    6767    }
    68     $Output .= '</select> <input type="submit" value="'.T('Enter').'" />
    69     </form>';
    70     $Output .= '</fieldset>';
     68    $Output .= '</select>'.
     69      '<input type="submit" value="'.T('Enter').'" />'.
     70      '</form>';
     71      '</fieldset>';
    7172    return $Output;
    7273  }
  • trunk/Modules/User/Registration.php

    r880 r884  
    103103      if (array_key_exists('Language', $_POST)) $Language = $_POST['Language'] * 1;
    104104        else $Language = '';
    105       if (array_key_exists('ClientVersion', $_POST)) $PreferredVersion = $_POST['ClientVersion'] * 1;
     105      if (array_key_exists('ClientVersion', $_POST) and is_numeric($_POST['ClientVersion']))
     106        $PreferredVersion = $_POST['ClientVersion'] * 1;
    106107        else $PreferredVersion = '';
    107108      if ($PreferredVersion == '') $PreferredVersion = 'NULL';
  • trunk/Modules/User/User.php

    r880 r884  
    257257      // Refresh time of last access
    258258      $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('ActivityTime' => 'NOW()'));
    259     } else {
     259    } else
     260    {
    260261      if (GetRemoteAddress() != '') $HostName = gethostbyaddr(GetRemoteAddress());
    261262        else $HostName = '';
     
    313314    $UserId = $this->Database->insert_id;
    314315    $this->Database->query('INSERT INTO `UserTrace` (`User`, `LastIP`, `UserAgent`) '.
    315         'VALUES ('.$UserId.', "'.GetRemoteAddress().'", '.
    316         '"'.$this->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'")');
     316      'VALUES ('.$UserId.', "'.GetRemoteAddress().'", '.
     317      '"'.$this->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'")');
    317318  }
    318319}
Note: See TracChangeset for help on using the changeset viewer.