WordPress.org

Making WordPress.org

Changeset 3557


Ignore:
Timestamp:
06/22/16 15:22:11 (18 months ago)
Author:
tellyworth
Message:

Plugin directory: [3350] introduced a reference to $_SERVER, which won't work due to caching. Remove it.

See #1729

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php

    r3550 r3557  
    255255        $version_cutoff = ( defined('WP_CORE_STABLE_BRANCH') ? sprintf( '%0.1f', WP_CORE_STABLE_BRANCH - 0.5) : '4.0' ); 
    256256 
    257         // If the request comes from WordPress and the major version string looks sane, use a more specific version constraint 
    258         if ( preg_match( '|WordPress/(\d+[.]\d+)|', $_SERVER['HTTP_USER_AGENT'], $matches ) ) { 
    259             if ( $matches[1] >= $version_cutoff && $matches[1] <= WP_CORE_STABLE_BRANCH ) { 
    260                 $version_cutoff = sprintf( '%0.1f', $matches[1] - 0.2 ); 
    261             } 
    262         } 
    263  
    264257        // Start building the WP-style search query args 
    265258        // They'll be translated to ES format args later 
Note: See TracChangeset for help on using the changeset viewer.