mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-53538 mod_data: Show no records message instead of error.
When there are no records in the database module and a user does an advanced search. Show a message that there are no entries in the database.
This commit is contained in:
parent
fed66ad9e2
commit
53934bd0a9
@ -3654,6 +3654,11 @@ function data_get_all_recordids($dataid, $selectdata = '', $params = null) {
|
||||
* @return array $recordids An array of record ids.
|
||||
*/
|
||||
function data_get_advance_search_ids($recordids, $searcharray, $dataid) {
|
||||
// Check to see if we have any record IDs.
|
||||
if (empty($recordids)) {
|
||||
// Send back an empty search.
|
||||
return array();
|
||||
}
|
||||
$searchcriteria = array_keys($searcharray);
|
||||
// Loop through and reduce the IDs one search criteria at a time.
|
||||
foreach ($searchcriteria as $key) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user