aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
authorJakob Haufe2010-02-09 18:33:27 +0100
committerPim van den Berg2010-02-16 00:53:55 +0100
commit596dd7d41468ab8ffb3b821163b486e6629e2212 (patch)
treec3bdac629f213f496c05f36fcfb01b41368678bb /inc
parentadd compatibility if rrdinfo doesn't work as expected (diff)
downloadapt-panopticon_cgp-596dd7d41468ab8ffb3b821163b486e6629e2212.zip
apt-panopticon_cgp-596dd7d41468ab8ffb3b821163b486e6629e2212.tar.gz
apt-panopticon_cgp-596dd7d41468ab8ffb3b821163b486e6629e2212.tar.bz2
apt-panopticon_cgp-596dd7d41468ab8ffb3b821163b486e6629e2212.tar.xz
make rrdfiles using utf8 and spaces work
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.inc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/functions.inc.php b/inc/functions.inc.php
index 2906530..b0706d5 100644
--- a/inc/functions.inc.php
+++ b/inc/functions.inc.php
@@ -5,17 +5,17 @@
5function validate_get($value, $type) { 5function validate_get($value, $type) {
6 switch($type) { 6 switch($type) {
7 case 'host': 7 case 'host':
8 if (!preg_match('/^[\d\w\W]+$/', $value)) 8 if (!preg_match('/^[\d\w\W]+$/u', $value))
9 return NULL; 9 return NULL;
10 break; 10 break;
11 case 'plugin': 11 case 'plugin':
12 case 'type': 12 case 'type':
13 if (!preg_match('/^\w+$/', $value)) 13 if (!preg_match('/^\w+$/u', $value))
14 return NULL; 14 return NULL;
15 break; 15 break;
16 case 'pinstance': 16 case 'pinstance':
17 case 'tinstance': 17 case 'tinstance':
18 if (!preg_match('/^[\d\w-]+$/', $value)) 18 if (!preg_match('/^[\d\w-]+$/u', $value))
19 return NULL; 19 return NULL;
20 break; 20 break;
21 } 21 }
@@ -23,5 +23,8 @@ function validate_get($value, $type) {
23 return $value; 23 return $value;
24} 24}
25 25
26function crc32hex($str) {
27 return sprintf("%x",crc32($str));
28}
26 29
27?> 30?>