diff --git a/.editorconfig b/.editorconfig index 2ec19b78..51499854 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,5 +15,5 @@ trim_trailing_whitespace = false [{composer.json,package.json}] indent_style = space -[package.json] +[{package.json, *.yml}] indent_size = 2 \ No newline at end of file diff --git a/admin/index.php b/admin/index.php index 3974f953..957fe1b6 100644 --- a/admin/index.php +++ b/admin/index.php @@ -30,11 +30,6 @@ if(!$db->hasTable('myaac_account_actions')) { throw new RuntimeException('Seems that the table myaac_account_actions of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting this url.'); } -// event system -require_once SYSTEM . 'hooks.php'; -$hooks = new Hooks(); -$hooks->load(); - require SYSTEM . 'status.php'; require SYSTEM . 'login.php'; require __DIR__ . '/includes/functions.php'; diff --git a/admin/pages/accounts.php b/admin/pages/accounts.php index f3022e9c..214b82f0 100644 --- a/admin/pages/accounts.php +++ b/admin/pages/accounts.php @@ -327,8 +327,8 @@ else if (isset($_REQUEST['search'])) {
@@ -338,8 +338,8 @@ else if (isset($_REQUEST['search'])) {
@@ -347,8 +347,8 @@ else if (isset($_REQUEST['search'])) {
@@ -403,8 +403,8 @@ else if (isset($_REQUEST['search'])) {
@@ -581,18 +581,18 @@ else if (isset($_REQUEST['search'])) {
- +
- +
- +
- +
diff --git a/admin/pages/news.php b/admin/pages/news.php index 66398b09..81153e4f 100644 --- a/admin/pages/news.php +++ b/admin/pages/news.php @@ -23,10 +23,10 @@ if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) { header('X-XSS-Protection:0'); // some constants, used mainly by database (cannot by modified without schema changes) -define('NEWS_TITLE_LIMIT', 100); -define('NEWS_BODY_LIMIT', 65535); // maximum news body length -define('ARTICLE_TEXT_LIMIT', 300); -define('ARTICLE_IMAGE_LIMIT', 100); +const NEWS_TITLE_LIMIT = 100; +const NEWS_BODY_LIMIT = 65535; // maximum news body length +const ARTICLE_TEXT_LIMIT = 300; +const ARTICLE_IMAGE_LIMIT = 100; $name = $p_title = ''; if(!empty($action)) @@ -52,12 +52,13 @@ if(!empty($action)) $p_title = $body = $comments = $article_text = $article_image = ''; $type = $category = $player_id = 0; - success("Added successful."); + success('Added successful.'); } } else if($action == 'delete') { - News::delete($id, $errors); - success("Deleted successful."); + if (News::delete($id, $errors)) { + success('Deleted successful.'); + } } else if($action == 'edit') { @@ -82,7 +83,7 @@ if(!empty($action)) $action = $p_title = $body = $comments = $article_text = $article_image = ''; $type = $category = $player_id = 0; - success("Updated successful."); + success('Updated successful.'); } } } diff --git a/admin/pages/players.php b/admin/pages/players.php index b409c15e..eaa06494 100644 --- a/admin/pages/players.php +++ b/admin/pages/players.php @@ -390,8 +390,8 @@ else if (isset($_REQUEST['search'])) {
@@ -399,8 +399,8 @@ else if (isset($_REQUEST['search'])) { @@ -410,8 +410,8 @@ else if (isset($_REQUEST['search'])) {
@@ -424,8 +424,8 @@ else if (isset($_REQUEST['search'])) { $configTowns[$player->getTownId()] = 'Unknown Town'; } - foreach ($configTowns as $id => $town): ?> - + foreach ($configTowns as $_id => $town): ?> +
@@ -436,8 +436,8 @@ else if (isset($_REQUEST['search'])) { @@ -554,16 +554,16 @@ else if (isset($_REQUEST['search'])) {
$info) { + foreach ($skills as $_id => $info) { ?>
- ' . $info[0] . ' - '; ?> + ' . $info[0] . ' + '; ?>
- ' . $info[0] . ' tries - '; ?> + ' . $info[0] . ' tries + '; ?>
@@ -622,7 +622,7 @@ else if (isset($_REQUEST['search'])) { if ($outfitlist) { ?> $s_name) { - echo ''; + foreach ($addon_type as $_id => $s_name) { + echo ''; } ?> @@ -704,7 +704,7 @@ else if (isset($_REQUEST['search'])) {
- + [max. length: 2000 chars, 50 lines (ENTERs)]
@@ -841,7 +841,7 @@ else if (isset($_REQUEST['search'])) { const $addonvalue = $('#look_addons'); - $('#look_addons').on('change', () => { + $addonvalue.on('change', () => { updateOutfit(); }); @@ -870,18 +870,18 @@ else if (isset($_REQUEST['search'])) {
- +
- +
- +
- +
@@ -892,7 +892,7 @@ else if (isset($_REQUEST['search'])) {