Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_hidden_indexed_fields()

Parameters

This function accepts no parameters.

Location

include/resource_functions.php lines 7501 to 7527

Definition

 
function get_hidden_indexed_fields()
    {
    
# Return an array of indexed fields to which the current user does not have access
    # Used by do_search to ommit fields when searching.
    
$hidden=array();
    global 
$hidden_fields_cache;
    if (
is_array($hidden_fields_cache)){
        return 
$hidden_fields_cache;
    } else {
        
$fields=ps_query("select ref,active from resource_type_field where length(name)>0",array(),"schema");
        
# Apply field permissions
        
for ($n=0;$n<count($fields);$n++)
            {
            if (
$fields[$n]["active"]==&& metadata_field_view_access($fields[$n]["ref"]))
                {
                
# Visible field
                
}
            else
                {
                
# Hidden field
                
$hidden[]=$fields[$n]["ref"];
                }
            }
        
$hidden_fields_cache=$hidden;
        return 
$hidden;
        }
    }

This article was last updated 2nd October 2022 05:05 Europe/London time based on the source file dated 30th September 2022 14:20 Europe/London time.