diff --git a/hook.php b/hook.php index cc64124..88eb873 100644 --- a/hook.php +++ b/hook.php @@ -691,4 +691,20 @@ function plugin_retrieve_more_data_from_ldap_example(array $datas) { function plugin_retrieve_more_field_from_ldap_example($fields) { return $fields; } + +// Check to add to status page +function plugin_example_Status($param) { + // Do checks (no check for example) + $ok = true; + echo "example plugin: example"; + if ($ok) { + echo "_OK"; + } else { + echo "_PROBLEM"; + // Only set ok to false if trouble (global status) + $param['ok'] = false; + } + echo "\n"; + return $param; +} ?> \ No newline at end of file diff --git a/setup.php b/setup.php index d71ef92..f5e31a7 100755 --- a/setup.php +++ b/setup.php @@ -164,6 +164,8 @@ function plugin_init_example() { $PLUGIN_HOOKS['post_init']['example'] = 'plugin_example_postinit'; + $PLUGIN_HOOKS['status']['example'] = 'plugin_example_Status'; + // CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm(); $PLUGIN_HOOKS['csrf_compliant']['example'] = true; }