mirror of
https://github.com/slawkens/myaac.git
synced 2026-04-26 12:23:32 +02:00
Compare commits
10 Commits
feature/da
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81b8bd8a2c | ||
|
|
def432d4b7 | ||
|
|
b0edbb79d9 | ||
|
|
ba1ee4bdb7 | ||
|
|
54bdea85a3 | ||
|
|
ac9a328206 | ||
|
|
609cf152af | ||
|
|
ec7079dd57 | ||
|
|
fa93187f80 | ||
|
|
7bc8a66cc1 |
@@ -86,12 +86,6 @@ Look: [Contributing](https://docs.my-aac.org/misc/contributing) in our wiki.
|
||||
|
||||
If you have a great idea or want to contribute to the project - visit our website at https://www.my-aac.org
|
||||
|
||||
## Project supported by JetBrains
|
||||
|
||||
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
|
||||
|
||||
[](https://www.jetbrains.com/?from=https://github.com/slawkens)
|
||||
|
||||
### License
|
||||
|
||||
This program and all associated files are released under the GNU Public License.
|
||||
|
||||
@@ -30,9 +30,6 @@ parameters:
|
||||
# Eloquent models
|
||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\)#'
|
||||
- '#Call to an undefined static method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\)#'
|
||||
# system/pages/highscores.php
|
||||
- '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$online_status#'
|
||||
- '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$vocation_name#'
|
||||
-
|
||||
message: '#Variable \$tmp in empty\(\) always exists and is always falsy#'
|
||||
path: templates\kathrine\javascript.php
|
||||
|
||||
@@ -47,7 +47,6 @@ if(isset($_REQUEST['name']))
|
||||
|
||||
if(empty($name))
|
||||
{
|
||||
$tmp_link = getPlayerLink($name);
|
||||
echo 'Here you can get detailed information about a certain player on ' . $config['lua']['serverName'] . '.<br/>';
|
||||
echo generate_search_form(true);
|
||||
return;
|
||||
|
||||
@@ -210,10 +210,14 @@ if (empty($highscores)) {
|
||||
}
|
||||
|
||||
$highscores = $query->get()->map(function($row) {
|
||||
/**
|
||||
* @var Player $row
|
||||
*/
|
||||
$tmp = $row->toArray();
|
||||
$tmp['online'] = $row->online_status;
|
||||
$tmp['vocation'] = $row->vocation_name;
|
||||
$tmp['outfit_url'] = $row->outfit_url; // @phpstan-ignore-line
|
||||
$tmp['outfit_url'] = $row->outfit_url;
|
||||
$tmp['link'] = getPlayerLink($row->name, false);
|
||||
unset($tmp['online_table']);
|
||||
|
||||
return $tmp;
|
||||
@@ -247,7 +251,6 @@ foreach($highscores as $id => &$player)
|
||||
$player['experience'] = number_format($player['experience']);
|
||||
}
|
||||
|
||||
$player['link'] = getPlayerLink($player['name'], false);
|
||||
$player['flag'] = getFlagImage($player['country']);
|
||||
$player['outfit'] = '<img style="position:absolute;margin-top:-50px;margin-left:-30px" src="' . $player['outfit_url'] . '" alt="" />';
|
||||
|
||||
|
||||
@@ -108,8 +108,9 @@ $title = 'Latest News';
|
||||
$cache = Cache::getInstance();
|
||||
|
||||
$news_cached = false;
|
||||
if($cache->enabled())
|
||||
if($cache->enabled() && !admin()) {
|
||||
$news_cached = News::getCached(NEWS);
|
||||
}
|
||||
|
||||
if(!$news_cached)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,15 @@ class Account extends Model {
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'number', 'email', 'password',
|
||||
'key', 'created', 'rlname', 'location', 'country',
|
||||
'web_lastlogin', 'web_flags',
|
||||
'email_new', 'email_new_time', 'email_code',
|
||||
'premium_points', 'coins', 'coins_transferable',
|
||||
'premium_ends_at', 'premend', 'lastday', 'premdays',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'lastday' => 'integer',
|
||||
'premdays' => 'integer',
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MyAAC\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class BugTracker extends Model {
|
||||
|
||||
protected $table = TABLE_PREFIX . 'bugtracker';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['account', 'type', 'status', 'text', 'id', 'subject', 'reply', 'who', 'uid', 'tag'];
|
||||
|
||||
}
|
||||
@@ -5,8 +5,10 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
/**
|
||||
* @property string $name
|
||||
* @property int $level
|
||||
* @property int $vocation
|
||||
* @property int $promotion
|
||||
* @property int $online
|
||||
* @property int $looktype
|
||||
* @property int $lookhead
|
||||
@@ -14,6 +16,8 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
* @property int $looklegs
|
||||
* @property int $lookfeet
|
||||
* @property int $lookaddons
|
||||
* @property bool $online_status
|
||||
* @property string $vocation_name
|
||||
* @property string $outfit_url
|
||||
* @property hasOne $onlineTable
|
||||
*/
|
||||
|
||||
@@ -870,7 +870,11 @@ class Plugins {
|
||||
|
||||
global $hooks;
|
||||
foreach($plugin_info['hooks'] ?? [] as $name => $info) {
|
||||
$hooks->unregister($name, $info['type'], $info['file']);
|
||||
if (str_contains($info['type'], 'HOOK_')) {
|
||||
$info['type'] = str_replace('HOOK_', '', $info['type']);
|
||||
}
|
||||
|
||||
$hooks->unregister($name, 'HOOK_' . $info['type'], $info['file']);
|
||||
}
|
||||
|
||||
clearCache();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use MyAAC\Models\Gallery;
|
||||
|
||||
if(PAGE !== 'news') {
|
||||
if(PAGE !== 'news' || !$db->hasTable(TABLE_PREFIX . 'gallery')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user