Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_filter()

Description

Get filter summary details

Parameters

ColumnTypeDefaultDescription
$filterid int ID of filter (from usergroup search_filter_id or user search_filter_oid)

Return

array

Location

include/search_functions.php lines 2993 to 3013

Definition

 
function get_filter($filterid)
    {
    
// Codes for filter 'condition' column
    // 1 = ALL must apply
    // 2 = NONE must apply
    // 3 = ANY can apply

    
if(!is_numeric($filterid) || $filterid 1)
            {
            return 
false;
            }

    
$filter  ps_query("SELECT ref, name, filter_condition FROM filter f WHERE ref=?",array("i",$filterid));

    if(
count($filter) > 0)
        {
        return 
$filter[0];
        }

    return 
false;
    }

This article was last updated 12th December 2024 20:35 Europe/London time based on the source file dated 12th December 2024 10:30 Europe/London time.