← Back to team overview

evoteam team mailing list archive

[Bug 531252] Re: DataobjectCache doesn't handle multi-selects

 

Should be released (unverified). Marking as such.

** Changed in: b2evolution
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Evoteam,
which is subscribed to b2evolution.
https://bugs.launchpad.net/bugs/531252

Title:
  DataobjectCache doesn't handle multi-selects

Status in b2evolution:
  Fix Released
Status in Quam Plures, as many as possible:
  Fix Released

Bug description:
  Function get_option_list() [approx 559] incorrectly expects $default
  to be a single value. It can be an array when using multi-selects.

  The cure is to convert $default into an array if it's a single value
  and then change the selected="selected" check to in_array();

  function get_option_list( $default = 0, $allow_none = false, $method = 'get_name' )
  {
  	if( !is_array( $default ) )
  	{
  		$default = array( $default );
  	}

  ......

          if( in_array( $loop_Obj->ID, $default ) ) $r .= '
  selected="selected"';

  ¥