Browse Source

Readability changes

Jose Lorenzo Rodriguez 14 years ago
parent
commit
00a5510b1d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lib/Cake/Network/CakeResponse.php

+ 4 - 4
lib/Cake/Network/CakeResponse.php

@@ -713,11 +713,11 @@ class CakeResponse {
 			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 @@ class CakeResponse {
 	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 @@ class CakeResponse {
 	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, ', ');