Compatibility with OTHire (#330)

* Preparing compatibility to OTHire

* Still working on compatibility to OTHire

* More compatibility

* More compatibility

Not tested yet

* Some fixes

- Fixed Account Creation.
- Fixed a problem that you can't load the website, that include that you can now recover your account number.

* More fixes

- Fixed character creation.
- Fixed login problem.
- Fixed displaying account number in My Account.
- Fixed displaying if you have premium days or not in My Account.

* More fixes

- Handle Kills/Deaths as TFS_03

* More fixes

- Fixed showing outfits in character profile
- Fixed displaying player houses in character profile
- Fixed displaying guilds

* Update init.php
This commit is contained in:
Rodrigo Paixão
2018-12-03 04:58:29 -02:00
committed by Stefan A. Brannfjell
parent 0d51f87c76
commit 2817010781
30 changed files with 377 additions and 198 deletions

View File

@@ -21,10 +21,10 @@ if (empty($_POST) === false) {
// $_POST['']
// .3 compatibility
if ($config['TFSVersion'] == 'TFS_03' && $config['salt'] === true) {
if ($config['ServerEngine'] == 'TFS_03' && $config['salt'] === true) {
$salt = user_data($session_user_id, 'salt');
}
if (sha1($_POST['current_password']) === $pass_data['password'] || $config['TFSVersion'] == 'TFS_03' && $config['salt'] === true && sha1($salt['salt'].$_POST['current_password']) === $pass_data['password']) {
if (sha1($_POST['current_password']) === $pass_data['password'] || $config['ServerEngine'] == 'TFS_03' && $config['salt'] === true && sha1($salt['salt'].$_POST['current_password']) === $pass_data['password']) {
if (trim($_POST['new_password']) !== trim($_POST['new_password_again'])) {
$errors[] = 'Your new passwords do not match.';
} else if (strlen($_POST['new_password']) < 6) {
@@ -50,9 +50,9 @@ if (isset($_GET['success']) && empty($_GET['success'])) {
} else {
if (empty($_POST) === false && empty($errors) === true) {
//Posted the form without errors
if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') {
if ($config['ServerEngine'] == 'TFS_02' || $config['ServerEngine'] == 'TFS_10' || $config['ServerEngine'] == 'OTHIRE') {
user_change_password($session_user_id, $_POST['new_password']);
} else if ($config['TFSVersion'] == 'TFS_03') {
} else if ($config['ServerEngine'] == 'TFS_03') {
user_change_password03($session_user_id, $_POST['new_password']);
}
header('Location: changepassword.php?success');