-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from JWardee/v1.3.0
+Removed attempted multisite unit test for dropping tables
- Loading branch information
Showing
5 changed files
with
18 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,12 @@ static public function get($args = []) | |
{ | ||
global $wpdb; | ||
|
||
$cachedValue = Cache::get($args); | ||
if (!isset($args['ignore_cache']) || $args['ignore_cache'] == false) { | ||
$cachedValue = Cache::get($args); | ||
|
||
if ($cachedValue != null) { | ||
return $cachedValue; | ||
if ($cachedValue != null) { | ||
return $cachedValue; | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -100,7 +102,13 @@ static public function get($args = []) | |
OFFSET " . ($args['posts_per_page'] * ($args['paged'] - 1)); | ||
} | ||
|
||
return Cache::set($args, self::dbResultTransform($wpdb->get_results($sql, ARRAY_A), $args)); | ||
$results = self::dbResultTransform($wpdb->get_results($sql, ARRAY_A), $args); | ||
|
||
if (!isset($args['ignore_cache']) || $args['ignore_cache'] == false) { | ||
Cache::set($args, $results); | ||
} | ||
|
||
return $results; | ||
} | ||
|
||
static private function dbResultTransform($results, $args = []) | ||
|
@@ -174,8 +182,9 @@ static private function getEmailFrom($logEntry) | |
$fullHeader = GeneralHelper::searchForSubStringInArray($logEntry['additional_headers'], 'From: '); | ||
|
||
/** | ||
* Need to replace "custom:" as well due to a bug in previous versions | ||
* This cannot be removed because of a bug in previous versions | ||
* that caused the header to save as "custom: from: [email protected]" | ||
* @url https://github.com/JWardee/wp-mail-catcher/issues/56 | ||
*/ | ||
return str_replace(['custom:', 'From:', ' '], '', $fullHeader); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.