Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_hidden_indexed_fields()

Parameters

This function accepts no parameters.

Location

include/resource_functions.php lines 7520 to 7546

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=sql_query("select ref,active from resource_type_field where length(name)>0","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 28th November 2020 23:05 Europe/London time based on the source file dated 27th November 2020 14:50 Europe/London time.