diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-06 10:46:59 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-06 10:46:59 +0400 |
commit | b8bd8cf1df9efcf41cc1b057805d12a91085bfe3 (patch) | |
tree | dfeea1da48bddd1c5f0e24660e85ecafb207c74f /plugins/Provider | |
parent | 3412d1bdc71e9d5f3eed2c22df3cc4e2913af629 (diff) |
- make sure all "Others" type legends are correct on all graphs
- regression: 'label' should always be first column, prettier in API results
- translate some text in plugin + show how easy it is to translate a plugin
Diffstat (limited to 'plugins/Provider')
-rw-r--r-- | plugins/Provider/functions.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/Provider/functions.php b/plugins/Provider/functions.php index d8dd792795..9996ad274d 100644 --- a/plugins/Provider/functions.php +++ b/plugins/Provider/functions.php @@ -5,11 +5,15 @@ function Piwik_getHostnameName($in) { return Piwik_Translate('General_Unknown'); } - elseif(strtolower($in) === 'ip') + if(strtolower($in) === 'ip') { return "IP"; } - return ucfirst(substr($in, 0, strpos($in, '.'))); + if(($positionDot = strpos($in, '.')) !== false) + { + return ucfirst(substr($in, 0, $positionDot)); + } + return $in; } function Piwik_getHostnameUrl($in) |