mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Patch some changes/fixes from 0.8 branch
Fix Gesior signature double dollar $$ Add some missing <br/> to online page Use $config['last_kills_limit'] in lastkills.php Fix save_ranks.php: getLastError(); Fix PHPMailer autoloader Fix leaking sensitive informations on MySQL Connection Fail Add nginx-sample.conf Change myaac_monsters.loot to text Add more files to ignore file
This commit is contained in:
parent
a7105d33f2
commit
5d499bc5e6
31
.gitignore
vendored
31
.gitignore
vendored
@ -1,3 +1,34 @@
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
.idea
|
||||
|
||||
releases
|
||||
config.local.php
|
||||
PERSONAL_NOTES
|
||||
|
||||
# all custom templates
|
||||
templates/*
|
||||
!templates/tibiacom
|
||||
!templates/kathrine
|
||||
|
||||
# guild images
|
||||
images/guilds/*
|
||||
!images/guilds/default.gif
|
||||
|
||||
# cache
|
||||
system/cache/*
|
||||
!system/cache/index.html
|
||||
!system/cache/twig/index.html
|
||||
!system/cache/signatures/index.html
|
||||
|
||||
# logs
|
||||
system/logs/*
|
||||
!system/logs/index.html
|
||||
|
||||
# plugins
|
||||
plugins/*
|
||||
!plugins/.htaccess
|
||||
!plugins/example.json
|
||||
!plugins/account-create-hint.json
|
||||
!plugins/account-create-hint
|
||||
landing
|
||||
|
@ -236,7 +236,7 @@ CREATE TABLE `myaac_monsters` (
|
||||
`summonable` tinyint(1) NOT NULL,
|
||||
`convinceable` tinyint(1) NOT NULL,
|
||||
`race` varchar(255) NOT NULL,
|
||||
`loot` varchar(500) NOT NULL,
|
||||
`loot` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = MyISAM;
|
||||
|
||||
|
@ -203,7 +203,7 @@ if(!$error) {
|
||||
|
||||
if(!fieldExist('deleted', 'players') && !fieldExist('deletion', 'players')) {
|
||||
if(query("ALTER TABLE `players` ADD `deleted` TINYINT(1) NOT NULL DEFAULT 0;"))
|
||||
success($locale['step_database_adding_field'] . ' players.comment...');
|
||||
success($locale['step_database_adding_field'] . ' players.deleted...');
|
||||
}
|
||||
|
||||
if(fieldExist('hide_char', 'players')) {
|
||||
|
25
nginx-sample.conf
Normal file
25
nginx-sample.conf
Normal file
@ -0,0 +1,25 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /home/otserv/www/public;
|
||||
index index.php;
|
||||
server_name your-domain.com;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_read_timeout 240;
|
||||
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /system {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
@ -95,7 +95,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
'<ul>' .
|
||||
'<li>MySQL is not configured propertly in <i>config.lua</i>.</li>' .
|
||||
'<li>MySQL server is not running.</li>' .
|
||||
'</ul>' . $error);
|
||||
'</ul>' . $error->getMessage());
|
||||
|
||||
}
|
||||
$db = POT::getInstance()->getDBHandle();
|
||||
|
@ -30,20 +30,4 @@ function PHPMailerAutoload($classname)
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
||||
//SPL autoloading was introduced in PHP 5.1.2
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||
} else {
|
||||
spl_autoload_register('PHPMailerAutoload');
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Fall back to traditional autoload for old PHP versions
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
function __autoload($classname)
|
||||
{
|
||||
PHPMailerAutoload($classname);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$guild_name = isset($_REQUEST['guild']) ? urldecode($_REQUEST['guild']) : null;
|
||||
if(!Validator::guildName($guild_name)) {
|
||||
$errors[] = Validator::get;
|
||||
$errors[] = Validator::getLastError();
|
||||
}
|
||||
|
||||
if(empty($errors)) {
|
||||
|
@ -84,7 +84,7 @@ if(tableExist('player_killers')) // tfs 0.3
|
||||
else {
|
||||
//$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `player_deaths`.`killed_by` as `killed_by`, `player_deaths`.`time` as `time`, `player_deaths`.`is_player` as `is_player`, `player_deaths`.`level` as `level` FROM `player_deaths`, `players` as `d` INNER JOIN `players` as `p` ON player_deaths.player_id = p.id WHERE player_deaths.`is_player`='1' ORDER BY `time` DESC LIMIT " . $config['last_kills_limit'] . ";");
|
||||
|
||||
$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time`, `d`.`level`, `d`.`is_player` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id ORDER BY `time` DESC LIMIT 20;");
|
||||
$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time`, `d`.`level`, `d`.`is_player` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id ORDER BY `time` DESC LIMIT " . $config['last_kills_limit'] . ";");
|
||||
|
||||
if(!empty($players_deaths))
|
||||
{
|
||||
|
@ -26,6 +26,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
{# vocation statistics #}
|
||||
{% if config.online_vocations %}
|
||||
<br/>
|
||||
|
@ -20,7 +20,7 @@
|
||||
if($rank->isLoaded())
|
||||
{
|
||||
imagettftext($image , $fontsize, 0, 20, 75, $color, $font, 'Guild:');
|
||||
imagettftext($image , $fontsize, 0, 70, 75, $color, $font, $player->getRank()->getName() . ' of the ' . $$rank->getGuild()->getName());
|
||||
imagettftext($image , $fontsize, 0, 70, 75, $color, $font, $player->getRank()->getName() . ' of the ' . $rank->getGuild()->getName());
|
||||
}
|
||||
imagettftext($image , $fontsize, 0, 20, 95, $color, $font, 'Last Login:');
|
||||
imagettftext($image , $fontsize, 0, 100, 95, $color, $font, (($player->getLastLogin() > 0) ? date("j F Y, g:i a", $player->getLastLogin()) : 'Never logged in.'));
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajax validator
|
||||
* Returns xml file with result
|
||||
* Returns json with result
|
||||
*
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
|
Loading…
x
Reference in New Issue
Block a user