Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

get_hidden_indexed_fields()

Parameters

This function accepts no parameters.

Location

include/resource_functions.php lines 7979 to 8005

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 19th March 2024 06:05 Europe/London time based on the source file dated 11th March 2024 14:25 Europe/London time.