Replace uses of join() by implode()
[lhc/web/wiklou.git] / includes / OutputPage.php
index 5d1d5d0..11c23f0 100644 (file)
@@ -2069,7 +2069,7 @@ class OutputPage extends ContextSource {
                foreach ( SessionManager::singleton()->getVaryHeaders() as $header => $options ) {
                        $this->addVaryHeader( $header, $options );
                }
-               return 'Vary: ' . join( ', ', array_keys( $this->mVaryHeader ) );
+               return 'Vary: ' . implode( ', ', array_keys( $this->mVaryHeader ) );
        }
 
        /**
@@ -2213,8 +2213,12 @@ class OutputPage extends ContextSource {
 
                if ( $this->mEnableClientCache ) {
                        if (
-                               $config->get( 'UseSquid' ) && !SessionManager::getGlobalSession()->isPersistent() &&
-                               !$this->isPrintable() && $this->mCdnMaxage != 0 && !$this->haveCacheVaryCookies()
+                               $config->get( 'UseSquid' ) &&
+                               !$response->hasCookies() &&
+                               !SessionManager::getGlobalSession()->isPersistent() &&
+                               !$this->isPrintable() &&
+                               $this->mCdnMaxage != 0 &&
+                               !$this->haveCacheVaryCookies()
                        ) {
                                if ( $config->get( 'UseESI' ) ) {
                                        # We'll purge the proxy cache explicitly, but require end user agents