From 7c2b6a44f823ed7e6134e3c7b5363748e4d1fadc Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 21 Apr 2015 16:13:10 +0000 Subject: [PATCH] Customfields: - fix saving of @filename style options got automatically converted to label=@value style --- admin/inc/class.customfields.inc.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index 7bd4d2ba71..e7181fc228 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -318,11 +318,18 @@ class customfields if (!empty($content['cf_values'])) { $values = array(); - foreach(explode("\n",$content['cf_values']) as $line) + if($content['cf_values'][0] === '@') { - list($var,$value) = explode('=',trim($line),2); - $var = trim($var); - $values[$var] = empty($value) ? $var : $value; + $values['@'] = substr($content['cf_values'], $content['cf_values'][1] === '=' ? 2:1); + } + else + { + foreach(explode("\n",$content['cf_values']) as $line) + { + list($var,$value) = explode('=',trim($line),2); + $var = trim($var); + $values[$var] = empty($value) ? $var : $value; + } } $content['cf_values'] = $values; }