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

get_reports()

Parameters

This function accepts no parameters.

Location

include/reporting_functions.php lines 14 to 35

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 19th March 2024 03:05 Europe/London time based on the source file dated 8th March 2024 15:10 Europe/London time.