SF Bug #3003777 - Multivalue attributes with hundred of values hangs on modify

This commit is contained in:
Deon George
2011-04-29 00:19:53 +10:00
parent c23db377c2
commit 2ea1fc6314
2 changed files with 8 additions and 18 deletions

View File

@@ -838,13 +838,7 @@ class Attribute {
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',5,0,__FILE__,__LINE__,__METHOD__,$fargs);
$return = array();
foreach ($this->getOldValues() as $value)
if (! in_array($value,$this->getValues()))
array_push($return,$value);
return $return;
return array_diff($this->getOldValues(),$this->getValues());
}
/**
@@ -854,13 +848,7 @@ class Attribute {
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',5,0,__FILE__,__LINE__,__METHOD__,$fargs);
$return = array();
foreach ($this->getValues() as $value)
if (! in_array($value,$this->getOldValues()))
array_push($return,$value);
return $return;
return array_diff($this->getValues(),$this->getOldValues());
}
/**