mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Readability changes
This commit is contained in:
parent
5df2a0957f
commit
00a5510b1d
1 changed files with 4 additions and 4 deletions
|
@ -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, ', ');
|
||||
|
|
Loading…
Reference in a new issue