Making WordPress.org

Changeset 12543


Ignore:
Timestamp:
04/14/2023 04:47:35 PM (3 years ago)
Author:
Otto42
Message:

Photo directory: Switch limit matching to use a regular expression for the query. The extra backslashes are because of the ridiculous escaping necessary for both PHP and mySQL. Fixes #6934. Related #6569

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/search.php

    r12235 r12543  
    107107                        $where = preg_replace(
    108108                                "/LIKE '(\{\w+\})([^\{]+)(\{\w+\})'/",
    109                                 "LIKE '$2$1'",
     109                                "REGEXP '\\\\\\\\b$2.*'",
    110110                                $where
    111111                        );
Note: See TracChangeset for help on using the changeset viewer.