some fixes

* updated download links, as clients.halfaway.net isn't working anymore
* fixed some bugs while installing when field `email_next` or `hidden`
already exist
This commit is contained in:
slawkens1 2017-05-21 08:15:16 +02:00
parent 170eaec9b0
commit 75aa62a113
3 changed files with 17 additions and 13 deletions

View File

@ -225,7 +225,7 @@ $config = array(
); );
// download link to client. // download link to client.
$config['client_download'] = 'http://clients.halfaway.net/windows.php?tibia='. $config['client'] .''; $config['client_download'] = 'http://tibia-clients.com/clients/download/'. $config['client'] .'/exe/windows';
$config['client_download_linux'] = 'http://clients.halfaway.net/linux.php?tibia='. $config['client'] .''; $config['client_download_linux'] = 'http://tibia-clients.com/clients/download/'. $config['client'] .'/tar/linux';
?> ?>

View File

@ -150,10 +150,12 @@ if(!$error) {
} }
if(fieldExist('next_email', 'accounts')) { if(fieldExist('next_email', 'accounts')) {
if(query("ALTER TABLE `accounts` CHANGE `next_email` `email_next` INT(11) NOT NULL DEFAULT 0;")) { if(!fieldExist('email_next', 'accounts')) {
$tmp = str_replace('$FIELD$', 'accounts.next_email', $locale['step_database_changing_field']); if(query("ALTER TABLE `accounts` CHANGE `next_email` `email_next` INT(11) NOT NULL DEFAULT 0;")) {
$tmp = str_replace('$FIELD_NEW$', 'accounts.email_next', $tmp); $tmp = str_replace('$FIELD$', 'accounts.next_email', $locale['step_database_changing_field']);
success($tmp); $tmp = str_replace('$FIELD_NEW$', 'accounts.email_next', $tmp);
success($tmp);
}
} }
} }
else if(!fieldExist('email_next', 'accounts')) { else if(!fieldExist('email_next', 'accounts')) {
@ -194,10 +196,12 @@ if(!$error) {
} }
if(fieldExist('hide_char', 'players')) { if(fieldExist('hide_char', 'players')) {
if(query("ALTER TABLE `players` CHANGE `hide_char` `hidden` TINYINT(1) NOT NULL DEFAULT 0;")) { if(!fieldExist('hidden', 'players')) {
$tmp = str_replace('$FIELD$', 'players.hide_char', $locale['step_database_changing_field']); if(query("ALTER TABLE `players` CHANGE `hide_char` `hidden` TINYINT(1) NOT NULL DEFAULT 0;")) {
$tmp = str_replace('$FIELD_NEW$', 'players.hidden', $tmp); $tmp = str_replace('$FIELD$', 'players.hide_char', $locale['step_database_changing_field']);
success($tmp); $tmp = str_replace('$FIELD_NEW$', 'players.hidden', $tmp);
success($tmp);
}
} }
} }
else if(!fieldExist('hidden', 'players')) { else if(!fieldExist('hidden', 'players')) {

View File

@ -146,8 +146,8 @@ else {
<?php <?php
if(!isset($_SESSION['installed'])) { if(!isset($_SESSION['installed'])) {
file_get_contents('http://my-aac.org/report_install.php?v=' . MYAAC_VERSION); file_get_contents('http://my-aac.org/report_install.php?v=' . MYAAC_VERSION . '&b=' . urlencode(BASE_URL));
$_SESSION['installed'] = false; $_SESSION['installed'] = true;
} }
foreach($_SESSION as $key => $value) { foreach($_SESSION as $key => $value) {