+
page_alias); ?>
+
+
+
+
diff --git a/src/acore-wp-plugin/src/Manager/ACoreServices.php b/src/acore-wp-plugin/src/Manager/ACoreServices.php
index fbdd2ebcd..7701e4884 100644
--- a/src/acore-wp-plugin/src/Manager/ACoreServices.php
+++ b/src/acore-wp-plugin/src/Manager/ACoreServices.php
@@ -402,16 +402,44 @@ public function getUserNameByUserId($usedId) {
}
public function getRestorableItemsByCharacter($character) {
- $query = "SELECT `Id`, `ItemEntry`
- FROM `recovery_item`
- WHERE `Guid` = ?
- ";
+ $conn = $this->getCharacterEm()->getConnection();
+ $accId = $this->getAcoreAccountId();
+
+ if (!is_numeric($character) || !$accId) {
+ throw new \InvalidArgumentException('Invalid character');
+ }
+
+ $ownership = $conn->prepare(
+ "SELECT 1 FROM `characters` WHERE `guid` = ? AND `account` = ? AND `deleteDate` IS NULL"
+ );
+ $ownership->bindValue(1, intval($character));
+ $ownership->bindValue(2, intval($accId));
+ if (!$ownership->executeQuery()->fetchOne()) {
+ throw new \InvalidArgumentException('Character not found');
+ }
+
+ $stmt = $conn->prepare(
+ "SELECT `Id`, `ItemEntry`, `Count`, `DeleteDate`
+ FROM `recovery_item`
+ WHERE `Guid` = ?
+ ORDER BY `DeleteDate` DESC"
+ );
+ $stmt->bindValue(1, intval($character));
+ return $stmt->executeQuery()->fetchAllAssociative();
+ }
+
+ public function currentAccountOwnsCharacterName($name): bool {
+ $accId = $this->getAcoreAccountId();
+ if (!$accId || $name === '' || $name === null) {
+ return false;
+ }
$conn = $this->getCharacterEm()->getConnection();
- $stmt = $conn->prepare($query);
- $stmt->bindValue(1, $character);
- $stmt->executeQuery();
- $res = $stmt->executeQuery();
- return $res->fetchAllAssociative();
+ $stmt = $conn->prepare(
+ "SELECT 1 FROM `characters` WHERE `name` = ? AND `account` = ? AND `deleteDate` IS NULL"
+ );
+ $stmt->bindValue(1, $name);
+ $stmt->bindValue(2, intval($accId));
+ return (bool) $stmt->executeQuery()->fetchOne();
}
/**
From 3fb9994b731d3d0e7aad6a6c7a681f9c41c7e1ea Mon Sep 17 00:00:00 2001
From: FlyingArowana <16946913+TheSCREWEDSoftware@users.noreply.github.com>
Date: Tue, 23 Jun 2026 16:54:32 +0100
Subject: [PATCH 05/15] Misc menus: Unstuck nonce/data, Resurrection Scroll,
RAF nonce + icon escaping
---
.../ResurrectionScrollMenu.php | 13 ++++-
.../ResurrectionScrollView.php | 8 +--
.../Components/UnstuckMenu/UnstuckView.php | 54 +++++++++----------
.../UserPanel/Pages/RafProgressPage.php | 23 ++++----
.../src/Manager/Soap/SmartstoneService.php | 2 +-
5 files changed, 56 insertions(+), 44 deletions(-)
diff --git a/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollMenu.php b/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollMenu.php
index 4f11e8eeb..45816b1e0 100644
--- a/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollMenu.php
+++ b/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollMenu.php
@@ -24,9 +24,19 @@ public static function I()
return self::$instance;
}
+ private function isAvailable(): bool
+ {
+ if (Opts::I()->acore_resurrection_scroll != '1') {
+ return false;
+ }
+ $csv = get_option('acore_modules_csv', '');
+ $modules = $csv ? array_map('trim', explode(',', $csv)) : [];
+ return in_array('mod-resurrection-scroll', $modules);
+ }
+
function acore_resurrection_scroll_menu()
{
- if (Opts::I()->acore_resurrection_scroll == '1') {
+ if ($this->isAvailable()) {
add_submenu_page('profile.php', 'Scroll of Resurrection', 'Scroll of Resurrection', 'read', ACORE_SLUG . '-resurrection-scroll', array($this, 'acore_resurrection_scroll_menu_page'));
}
}
@@ -41,6 +51,5 @@ function acore_resurrection_scroll_menu_page()
function resurrection_scroll_menu_init()
{
$menu = ResurrectionScrollMenu::I();
-
add_action('admin_menu', array($menu, 'acore_resurrection_scroll_menu'));
}
diff --git a/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollView.php b/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollView.php
index 345fa33bb..19a69adf4 100644
--- a/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollView.php
+++ b/src/acore-wp-plugin/src/Components/ResurrectionScrollMenu/ResurrectionScrollView.php
@@ -16,7 +16,7 @@ public function getRender($data)
ob_start();
wp_enqueue_style('bootstrap-css', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css', array(), '5.1.3');
- wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.1');
+ wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.5');
wp_enqueue_script('bootstrap-js', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', array(), '5.1.3');
// Determine account status
@@ -42,7 +42,7 @@ public function getRender($data)
?>
-