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_hidden_indexed_fields()

Parameters

This function accepts no parameters.

Location

include/resource_functions.php lines 8225 to 8251

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 17th November 2024 15:05 Europe/London time based on the source file dated 15th November 2024 18:30 Europe/London time.