From 00a5510b1deadc5960e50e82acd94bc7f5553f2c Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 19 Jan 2012 22:26:59 -0430 Subject: [PATCH] Readability changes --- lib/Cake/Network/CakeResponse.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index 0bd5e47bf3b..889f860fa84 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -713,11 +713,11 @@ public function sharable($public = null, $time = null) { return $sharable; } if ($public) { - $this->_cacheDirectives['public'] = null; + $this->_cacheDirectives['public'] = true; unset($this->_cacheDirectives['private']); $this->sharedMaxAge($time); } else { - $this->_cacheDirectives['private'] = null; + $this->_cacheDirectives['private'] = true; unset($this->_cacheDirectives['public']); $this->maxAge($time); } @@ -781,7 +781,7 @@ public function maxAge($seconds = null) { public function mustRevalidate($enable = null) { if ($enable !== null) { if ($enable) { - $this->_cacheDirectives['must-revalidate'] = null; + $this->_cacheDirectives['must-revalidate'] = true; } else { unset($this->_cacheDirectives['must-revalidate']); } @@ -799,7 +799,7 @@ public function mustRevalidate($enable = null) { protected function _setCacheControl() { $control = ''; foreach ($this->_cacheDirectives as $key => $val) { - $control .= is_null($val) ? $key : sprintf('%s=%s', $key, $val); + $control .= $val === true ? $key : sprintf('%s=%s', $key, $val); $control .= ', '; } $control = rtrim($control, ', ');