• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed XenForo_Model_StyleProperty::getStylePropertyDefinitionsForAdminQuickSearch

R

ragtek

Guest
#1
You're using $db but it's not in the scope;)
PHP:
    public function getStylePropertyDefinitionsForAdminQuickSearch($searchText, array $propertyNames)
    {
        $searchStringSql = 'property_name LIKE ' . XenForo_Db::quoteLike($searchText, 'lr');

        if (!empty($phraseMatches))
        {
            $sqlConditions = '(' . $searchStringSql . ' OR property_name IN (' . $db->quote($propertyNames) . '))';
        }
        else
        {
            $sqlConditions = $searchStringSql;
        }

        return $this->fetchAllKeyed('
            SELECT *
            FROM xf_style_property_definition
            WHERE ' . $sqlConditions,
        'property_name');
    }