summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-13 12:07:00 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-13 12:07:00 +0000
commit079cac337e75b00e270baea445bf506be3d4555a (patch)
treeb21ccccbb99a7c4fae2101238cb723d5f5c28d7e /modules
parentdd3e3989cd044e7d3894e2653fad80d94decb7dd (diff)
downloadbrdo-079cac337e75b00e270baea445bf506be3d4555a.tar.gz
brdo-079cac337e75b00e270baea445bf506be3d4555a.tar.bz2
- Patch #428242 by David_Rothstein: small code clean-up in check_markup().
Diffstat (limited to 'modules')
-rw-r--r--modules/filter/filter.module5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 632847477..d49e42973 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -435,9 +435,6 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $langcode = '', $c
return $cached->data;
}
- // See if caching is allowed for this format.
- $cache = filter_format_allowcache($format);
-
// Convert all Windows and Mac newlines to a single newline,
// so filters only need to deal with one possibility.
$text = str_replace(array("\r\n", "\r"), "\n", $text);
@@ -456,7 +453,7 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $langcode = '', $c
}
// Store in cache with a minimum expiration time of 1 day.
- if ($cache) {
+ if (filter_format_allowcache($format)) {
cache_set($cache_id, $text, 'cache_filter', REQUEST_TIME + (60 * 60 * 24));
}
}