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:
+6
-3
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user