1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-01 01:52:18 +01:00

Rename function

This commit is contained in:
Jean Paul Galea 2015-09-08 14:42:11 +02:00
parent 0fdff26403
commit 21b795b852
4 changed files with 7 additions and 7 deletions

View File

@ -369,7 +369,7 @@ function total_time ($url)
* @argument $url string
* @return string|bool short name or false on failure
*/
function short_name ($url)
function shortname ($url)
{
if (($url = parse_url($url)) === FALSE)
return false;

View File

@ -41,7 +41,7 @@ require_once 'ykval-common.php';
# otp and client ID should be moved to a munin environment variable
$urls = otp2ksmurls('ccccccccfnkjtvvijktfrvvginedlbvudjhjnggndtck', 16);
$shortnames = array_map('short_name', $urls);
$shortnames = array_map('shortname', $urls);
if ($argc == 2 && strcmp($argv[1], 'autoconf') == 0)
{
@ -72,7 +72,7 @@ if ($argc == 2 && strcmp($argv[1], 'config') == 0)
echo "multigraph ykval_ksmlatency\n";
foreach ($urls as $url)
{
$shortname = short_name($url);
$shortname = shortname($url);
if (($total_time = total_time($url)) === FALSE)
$total_time = 'error';

View File

@ -38,7 +38,7 @@ require_once 'ykval-config.php';
require_once 'ykval-db.php';
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
$shortnames = array_map("short_name", $urls);
$shortnames = array_map("shortname", $urls);
if ($argc == 2 && strcmp($argv[1], "autoconf") == 0)
{
@ -84,7 +84,7 @@ foreach ($shortnames as $shortname)
foreach ($r as $result)
{
if (short_name($result['server']) === $shortname)
if (shortname($result['server']) === $shortname)
{
$count = $result['count'];
break;

View File

@ -39,7 +39,7 @@ require_once 'ykval-common.php';
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
$shortnames = array_map('short_name', $urls);
$shortnames = array_map('shortname', $urls);
foreach($shortnames as $val)
{
if ($val === FALSE)
@ -84,7 +84,7 @@ if ($argc == 2 && strcmp($argv[1], 'config') == 0)
echo "multigraph ykval_vallatency\n";
foreach ($urls as $url)
{
$shortname = short_name($url);
$shortname = shortname($url);
if (($total_time = total_time($url)) === FALSE)
$total_time = 'error';