http://code.google.com/p/emt/source/detail?r=225
Modified:
/trunk/base/field.php
/trunk/base/io_base.php
/trunk/bin/emt_gather
/trunk/plugins/commands/proc_net.php
=======================================
--- /trunk/base/field.php Thu Jan 12 15:31:08 2012
+++ /trunk/base/field.php Thu Jan 12 15:37:38 2012
@@ -138,11 +138,11 @@
foreach ($fields as $field)
{
- list($key, $value) = preg_split('/=/', $field);
+ list($key, $value) = preg_split('/=/', $field, 2);
if (strstr($key, '.'))
{
- list($name, $sub_name) = preg_split('/\./', $key);
+ list($name, $sub_name) = preg_split('/\./', $key, 2);
if ($name == $this->name)
{
=======================================
--- /trunk/base/io_base.php Thu Jan 12 15:31:08 2012
+++ /trunk/base/io_base.php Thu Jan 12 15:37:38 2012
@@ -88,14 +88,14 @@
if (!strlen($kv))
continue;
- list ($key, $value) = preg_split('/=/', $kv);
+ list ($key, $value) = preg_split('/=/', $kv, 2);
//remove the instance from the key name
$instance = '';
if (strstr($key, ':'))
{
- list ($instance, $key) = preg_split('/:/', $key);
+ list ($instance, $key) = preg_split('/:/', $key, 2);
}
//separate the field name from the sub field name
=======================================
--- /trunk/bin/emt_gather Wed Apr 13 12:35:43 2011
+++ /trunk/bin/emt_gather Thu Jan 12 15:37:38 2012
@@ -219,7 +219,7 @@
foreach ($f->values as $key => $value)
{
- if (!preg_match('/[a-zA-Z0-9]/', $key))
+ if (preg_match('/[ .,:]/', $key))
{
log_error("Field {$f->name} tried to write an
invalid sub_name of ($key) with value ($value). sub_name ($key) will be
dropped");
unset($f->values[$key]);
=======================================
--- /trunk/plugins/commands/proc_net.php Thu Jan 12 15:31:08 2012
+++ /trunk/plugins/commands/proc_net.php Thu Jan 12 15:37:38 2012
@@ -38,11 +38,11 @@
if (!strstr($field, '='))
continue;
- list($key, $value) = preg_split('/=/', $field);
+ list($key, $value) = preg_split('/=/', $field, 2);
if (strstr($key, '.'))
{
- list($name, $sub_name) = preg_split('/\./', $key);
+ list($name, $sub_name) = preg_split('/\./', $key, 2);
if ($name == $this->name)
{