MDL-55127 mod_data: Search entries fixes

- If the database contains has than 4 valid fields all fields from the 4th one
  to the last one will be merged into the 4th one so we index all entry contents
- get_content_value now receives the whole data_content record as fields may need
  other values than just the content to prepare the value
- phpunit database generator changes to separate checkboxes from radio buttons options
  and to separate multimenu options from menu options
This commit is contained in:
David Monllao
2016-08-25 16:50:15 +08:00
parent c52d34b255
commit fa90f52986
8 changed files with 57 additions and 37 deletions
+6 -3
View File
@@ -551,11 +551,14 @@ class data_field_base { // Base class for Database Field Types (see field/*/
/**
* Returns the presentable string value for a field content.
* @param string $value
*
* The returned string should be plain text.
*
* @param stdClass $content
* @return string
*/
public static function get_content_value($value) {
return trim($value);
public static function get_content_value($content) {
return trim($content->content, "\r\n ");
}
}