Page MenuHomePhorge

D1708.1775293264.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D1708.1775293264.diff

diff --git a/src/app/Domain.php b/src/app/Domain.php
--- a/src/app/Domain.php
+++ b/src/app/Domain.php
@@ -250,6 +250,30 @@
throw new \Exception("Invalid domain status: {$status}");
}
+ if (!$this->isPublic()) {
+ if ($new_status & self::STATUS_CONFIRMED) {
+ if ($new_status & self::STATUS_VERIFIED) {
+ $new_status |= self::STATUS_ACTIVE;
+ } else {
+ // if we have confirmed ownership of or management access to the domain, then
+ // we have also confirmed the domain exists in DNS.
+ $new_status |= self::STATUS_VERIFIED;
+ }
+ }
+
+ if ($new_status & self::STATUS_DELETED) {
+ $new_status ^= self::STATUS_ACTIVE;
+ }
+
+ if ($new_status & self::STATUS_SUSPENDED) {
+ $new_status ^= self::STATUS_ACTIVE;
+ }
+
+ if ($new_status & self::STATUS_ACTIVE) {
+ $new_status ^= self::STATUS_NEW;
+ }
+ }
+
$this->attributes['status'] = $new_status;
}
diff --git a/src/app/Observers/DomainObserver.php b/src/app/Observers/DomainObserver.php
--- a/src/app/Observers/DomainObserver.php
+++ b/src/app/Observers/DomainObserver.php
@@ -26,7 +26,7 @@
$domain->namespace = \strtolower($domain->namespace);
- $domain->status |= Domain::STATUS_NEW | Domain::STATUS_ACTIVE;
+ $domain->status |= Domain::STATUS_NEW;
}
/**

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 9:01 AM (9 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18827054
Default Alt Text
D1708.1775293264.diff (1 KB)

Event Timeline