Skip to content
Snippets Groups Projects
Commit 80d770ba authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fixes for modules/memcacheMonitor

parent 7036c5e7
No related branches found
No related tags found
No related merge requests found
<?php <?php
/** /**
* Hook to add the memcacheMonitor module to the config page. * Hook to add the memcacheMonitor module to the config page.
* *
* @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook. * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook.
* @return void
*/ */
function memcacheMonitor_hook_configpage(\SimpleSAML\XHTML\Template &$template) function memcacheMonitor_hook_configpage(\SimpleSAML\XHTML\Template &$template)
{ {
$template->data['links']['memcacheMonitor'] = [ $template->data['links']['memcacheMonitor'] = [
......
<?php <?php
/** /**
* Hook to add the simple consenet admin module to the frontpage. * Hook to add the simple consenet admin module to the frontpage.
* *
* @param array &$links The links on the frontpage, split into sections. * @param array &$links The links on the frontpage, split into sections.
* @return void
*/ */
function memcacheMonitor_hook_frontpage(&$links) function memcacheMonitor_hook_frontpage(&$links)
{ {
assert(is_array($links)); assert(is_array($links));
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
* This function verifies that all memcache servers work. * This function verifies that all memcache servers work.
* *
* @param array &$hookinfo hookinfo * @param array &$hookinfo hookinfo
* @return void
*/ */
function memcacheMonitor_hook_sanitycheck(&$hookinfo) function memcacheMonitor_hook_sanitycheck(&$hookinfo)
{ {
assert(is_array($hookinfo)); assert(is_array($hookinfo));
......
<?php <?php
/**
* @param int $input
* @return string
*/
function tdate($input) function tdate($input)
{ {
return date(DATE_RFC822, $input); return date(DATE_RFC822, $input);
} }
/**
* @param int $input
* @return string
*/
function hours($input) function hours($input)
{ {
if ($input < 60) { if ($input < 60) {
...@@ -19,6 +28,11 @@ function hours($input) ...@@ -19,6 +28,11 @@ function hours($input)
return number_format($input / (24 * 60 * 60), 2).' days'; return number_format($input / (24 * 60 * 60), 2).' days';
} }
/**
* @param int $input
* @return string
*/
function humanreadable($input) function humanreadable($input)
{ {
$output = ""; $output = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment