Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117788279
D1708.1775254469.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D1708.1775254469.diff
View Options
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,35 @@
throw new \Exception("Invalid domain status: {$status}");
}
+ if ($this->isPublic()) {
+ $this->attributes['status'] = $new_status;
+ return;
+ }
+
+ 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;
+ $new_status |= self::STATUS_ACTIVE;
+ }
+ }
+
+ if ($new_status & self::STATUS_DELETED && $new_status & self::STATUS_ACTIVE) {
+ $new_status ^= self::STATUS_ACTIVE;
+ }
+
+ if ($new_status & self::STATUS_SUSPENDED && $new_status & self::STATUS_ACTIVE) {
+ $new_status ^= self::STATUS_ACTIVE;
+ }
+
+ // if the domain is now active, it is not new anymore.
+ if ($new_status & self::STATUS_ACTIVE && $new_status & self::STATUS_NEW) {
+ $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
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 10:14 PM (14 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18826990
Default Alt Text
D1708.1775254469.diff (1 KB)
Attached To
Mode
D1708: Do not set the active status until after the ownership of or management access to has been confirmed.
Attached
Detach File
Event Timeline