VERSION_MAJOR = 2
which version is this? even if we are unreleased, keep track of internal version-to-be developers need to set this in code. The user-displayed string is generated into $CAT_VERSION_STRING and $CAT_COPYRIGHT below
Define some variables which need to be globally accessible and some general purpose methods
DEFAULTS = [[SETTING => CONFIG[APPEARANCE][from-mail], DEFVALUE => firstname.lastname@example.org, COMPLAINTSTRING => APPEARANCE/from-mail ], [SETTING => CONFIG[APPEARANCE][support-contact][url], DEFVALUE => email@example.com?body=Only%20English%20language%20please!, COMPLAINTSTRING => APPEARANCE/support-contact/url ], [SETTING => CONFIG[APPEARANCE][support-contact][display], DEFVALUE => firstname.lastname@example.org, COMPLAINTSTRING => APPEARANCE/support-contact/display ], [SETTING => CONFIG[APPEARANCE][support-contact][developer-mail], DEFVALUE => email@example.com, COMPLAINTSTRING => APPEARANCE/support-contact/mail ], [SETTING => CONFIG[APPEARANCE][abuse-mail], DEFVALUE => firstname.lastname@example.org, COMPLAINTSTRING => APPEARANCE/abuse-mail ], [SETTING => CONFIG[APPEARANCE][MOTD], DEFVALUE => Release Candidate. All bugs to be shot on sight!, COMPLAINTSTRING => APPEARANCE/MOTD ], [SETTING => CONFIG[APPEARANCE][webcert_CRLDP], DEFVALUE => [list, of, CRL, pointers], COMPLAINTSTRING => APPEARANCE/webcert_CRLDP ], [SETTING => CONFIG[DB][INST][host], DEFVALUE => db.host.example, COMPLAINTSTRING => DB/INST ], [SETTING => CONFIG[DB][INST][host], DEFVALUE => db.host.example, COMPLAINTSTRING => DB/USER ]]
$knownFederations : mixed|string|int
all known federation, in an array with ISO short name as an index, and localised version of the pretty-print name as value.
The static value is only filled with meaningful content after the first object has been instantiated. That is because it is not possible to define static properties with function calls like _().
$test_result : mixed|string|int
This array is used to return the test results.
As the 'global' entry it returns the maximum return value from all tests. Individual tests results are teturned as separate entires indexed by test names; each value is an array passing "level" and "message" from each of the tests. $test_result is set by the test_return method
listAllIdentityProviders( activeOnly, country) : mixed|string|int
Lists all identity providers in the database adding information required by DiscoJuice.
if set to non-zero will cause listing of only those institutions which have some valid profiles defined.
if set, only list IdPs in a specific country
the list of identity providers
printCountryList( activeOnly) : mixed|string|int
Prepares a list of countries known to the CAT.
is set and nonzero will cause that only countries with some institutions underneath will be listed
Array indexed by (uppercase) lang codes and sorted according to the current locale
getExternalDBEntityDetails( externalId, realm = NULL) : mixed|string|int
get additional details about an institution from the EXTERNAL customer DB (if any; for eduroam, this would be the official eduroam database)
the ID of the institution in the external DB
the function can also try to find an inst by its realm in the external DB
a list of institutions, ideally with only one member
createTemporaryDirectory( purpose = installer, failIsFatal = 1) : mixed|string|int
create a temporary directory and return the location
one of 'installer', 'logo', 'test' defined the purpose of the directory
decides if a creation failure should cause an error; defaults to true
the tuple of: base path, absolute path for directory, directory name
The multiple tests wrapper
the tests array.
The $Tests is a simple string array, where each entry is a test name the test names can also be given in the format "test=>subtest", which defines a conditional execution of the "subtest" if the "test" was run earier and returned a success.