Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117724764
D2851.1774890983.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
927 B
Referenced Files
None
Subscribers
None
D2851.1774890983.diff
View Options
diff --git a/src/app/Policy/Greylist/Request.php b/src/app/Policy/Greylist/Request.php
--- a/src/app/Policy/Greylist/Request.php
+++ b/src/app/Policy/Greylist/Request.php
@@ -83,8 +83,10 @@
}
// Purge all old information if we have no recent entries
+ $noEntry = false;
if (!$this->findConnectsCollectionRecent()->exists()) {
$this->findConnectsCollection()->delete();
+ $noEntry = true;
}
// See if the recipient opted-out of the feature
@@ -185,7 +187,7 @@
$defer = true;
// Retrieve the entry for the sender/recipient/net combination
- if ($connect = $this->findConnectsCollection()->first()) {
+ if (!$noEntry && ($connect = $this->findConnectsCollection()->first())) {
$connect->connect_count += 1;
// TODO: The period of time for which the greylisting persists is configurable.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 5:16 PM (4 d, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18817950
Default Alt Text
D2851.1774890983.diff (927 B)
Attached To
Mode
D2851: Avoid extra query if we know no entry exists
Attached
Detach File
Event Timeline