Unify SSO and surface legacy ResellerClub hosting orders on the dashboard.
Deploy Ladill Hosting / deploy (push) Successful in 26s
Deploy Ladill Hosting / deploy (push) Successful in 26s
Add silent OAuth and session keepalive, and show imported RC orders alongside native hosting accounts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -345,17 +345,28 @@ class HostingOrder extends Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function normalizedMeta(): array
|
||||
{
|
||||
$meta = $this->getAttributes()['meta'] ?? $this->meta ?? [];
|
||||
|
||||
while (is_string($meta)) {
|
||||
$decoded = json_decode($meta, true);
|
||||
$meta = json_last_error() === JSON_ERROR_NONE ? $decoded : [];
|
||||
}
|
||||
|
||||
return is_array($meta) ? $meta : [];
|
||||
}
|
||||
|
||||
private function metaValue(array $keys, mixed $default = null): mixed
|
||||
{
|
||||
$meta = $this->meta ?? [];
|
||||
$sources = [];
|
||||
$meta = $this->normalizedMeta();
|
||||
$sources = [$meta];
|
||||
|
||||
if (is_array($meta)) {
|
||||
$sources[] = $meta;
|
||||
|
||||
if (is_array($meta['raw'] ?? null)) {
|
||||
$sources[] = $meta['raw'];
|
||||
}
|
||||
if (is_array($meta['raw'] ?? null)) {
|
||||
$sources[] = $meta['raw'];
|
||||
}
|
||||
|
||||
foreach ($sources as $source) {
|
||||
|
||||
Reference in New Issue
Block a user