mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 12:33:35 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a860c95975 | ||
![]() |
e2de0b1440 | ||
![]() |
8b2ad2cf2f | ||
![]() |
88a320530c |
@@ -1,3 +1,10 @@
|
|||||||
|
[0.7.6 - 05.01.2017]
|
||||||
|
* fixed othire account creating/installation
|
||||||
|
* fixed table name players -> players_online
|
||||||
|
* fixed unexpected error logging about email fail
|
||||||
|
* added max_execution_time to the install finish step
|
||||||
|
* some small fix regarding highscores vocation box
|
||||||
|
|
||||||
[0.7.5 - 04.01.2017]
|
[0.7.5 - 04.01.2017]
|
||||||
* fixed bug on othire with config.account_premium_days
|
* fixed bug on othire with config.account_premium_days
|
||||||
* fixed bug on TFS 1.x when online_afk is enabled
|
* fixed bug on TFS 1.x when online_afk is enabled
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
define('MYAAC', true);
|
define('MYAAC', true);
|
||||||
define('MYAAC_VERSION', '0.7.5');
|
define('MYAAC_VERSION', '0.7.6');
|
||||||
define('DATABASE_VERSION', 20);
|
define('DATABASE_VERSION', 20);
|
||||||
define('TABLE_PREFIX', 'myaac_');
|
define('TABLE_PREFIX', 'myaac_');
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
|
ini_set('max_execution_time', 300);
|
||||||
if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['saved'])) {
|
if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['saved'])) {
|
||||||
warning($locale['already_installed']);
|
warning($locale['already_installed']);
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
* @var array
|
* @var array
|
||||||
* @version 0.1.5
|
* @version 0.1.5
|
||||||
*/
|
*/
|
||||||
private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','web_flags' => 0,'lastday' => 0,'premdays' => 0, 'created' => 0);
|
private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','web_flags' => 0, 'lastday' => 0, 'premdays' => 0, 'created' => 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new account.
|
* Creates new account.
|
||||||
@@ -249,13 +249,12 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
throw new E_OTS_NotLoaded();
|
throw new E_OTS_NotLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
$lastday = 'lastday';
|
|
||||||
if(fieldExist('premend', 'accounts'))
|
|
||||||
$lastday = 'premend';
|
|
||||||
|
|
||||||
$field = 'lastday';
|
$field = 'lastday';
|
||||||
if(isset($this->data['premend'])) { // othire
|
if(fieldExist('premend', 'accounts')) { // othire
|
||||||
$field = 'premend';
|
$field = 'premend';
|
||||||
|
if(!isset($this->data['premend'])) {
|
||||||
|
$this->data['premend'] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// UPDATE query on database
|
// UPDATE query on database
|
||||||
|
@@ -203,11 +203,12 @@ if($save)
|
|||||||
|
|
||||||
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
||||||
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
||||||
else
|
else {
|
||||||
error('An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '<br/>More info in system/logs/error.log');
|
error('An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '<br/>More info in system/logs/error.log');
|
||||||
log_append('error.log', '[createaccount.php] An error occorred while sending email: ' . $mailer->ErrorInfo . '. Error: ' . print_r(error_get_last(), true));
|
log_append('error.log', '[createaccount.php] An error occorred while sending email: ' . $mailer->ErrorInfo . '. Error: ' . print_r(error_get_last(), true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -22,11 +22,9 @@ $add_sql = '';
|
|||||||
$config_vocations = $config['vocations'];
|
$config_vocations = $config['vocations'];
|
||||||
if($config['highscores_vocation_box'] && isset($vocation))
|
if($config['highscores_vocation_box'] && isset($vocation))
|
||||||
{
|
{
|
||||||
for($i = 1; $i < count($config_vocations) / 2; $i++)
|
foreach($config['vocations'] as $id => $name) {
|
||||||
{
|
if(strtolower($name) == $vocation) {
|
||||||
if(strtolower($config_vocations[$i]) == $vocation)
|
$add_sql = 'AND ' . $db->fieldName('vocation') . ' = ' . $db->quote($id);
|
||||||
{
|
|
||||||
$add_sql = 'AND ' . $db->fieldName('vocation') . ' = ' . $db->quote($i);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -104,7 +104,7 @@ function updateStatus() {
|
|||||||
{
|
{
|
||||||
// get amount of players that are currently logged in-game, including disconnected clients (exited)
|
// get amount of players that are currently logged in-game, including disconnected clients (exited)
|
||||||
if(tableExist('players_online')) { // tfs 1.x
|
if(tableExist('players_online')) { // tfs 1.x
|
||||||
$query = $db->query('SELECT COUNT(`player_id`) AS `playersTotal` FROM `players`;');
|
$query = $db->query('SELECT COUNT(`player_id`) AS `playersTotal` FROM `players_online`;');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$query = $db->query('SELECT COUNT(`id`) AS `playersTotal` FROM `players` WHERE `online` > 0');
|
$query = $db->query('SELECT COUNT(`id`) AS `playersTotal` FROM `players` WHERE `online` > 0');
|
||||||
|
Reference in New Issue
Block a user