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

Parameters

This function accepts no parameters.

Location

include/reporting_functions.php lines 15 to 36

Definition

 
function get_reports()
    {
    
# Returns an array of reports. The standard reports are translated using $lang. Custom reports are i18n translated.
    # The reports are always listed in the same order - regardless of the used language. 

    # Executes query.
    
$r ps_query("SELECT ref, `name`, `query`, support_non_correlated_sql FROM report ORDER BY name");

    
# Translates report names in the newly created array.
    
$return = array();
    for (
$n 0;$n<count($r);$n++)
        {
        if (!
hook('ignorereport''', array($r[$n])))
            {
            
$r[$n]["name"] = get_report_name($r[$n]);
            
$r[$n]["contains_date"] = report_has_date((string) $r[$n]["query"]);
            
$r[$n]['has_thumbnail'] = report_has_thumbnail((string) $r[$n]["query"]);
            
$return[] = $r[$n];
            }
        }
    return 
$return;
    }

This article was last updated 14th September 2024 21:35 Europe/London time based on the source file dated 1st July 2024 14:45 Europe/London time.