Skip to content

Commit

Permalink
Merge branch 'MDL-75360-311' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_311_STABLE
  • Loading branch information
vmdef committed Aug 30, 2022
2 parents 633c6d7 + 0448a7b commit cb9583c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions user/classes/external/search_identity.php
Expand Up @@ -29,12 +29,11 @@ class search_identity extends \external_api {
/**
* Describes the external function parameters.
*
* @return external_function_parameters
* @return \external_function_parameters
*/
public static function execute_parameters(): \external_function_parameters {

return new \external_function_parameters([
'query' => new \external_value(PARAM_TEXT, 'The search query', VALUE_REQUIRED),
'query' => new \external_value(PARAM_RAW, 'The search query', VALUE_REQUIRED),
]);
}

Expand All @@ -50,7 +49,7 @@ public static function execute(string $query): array {
$params = \external_api::validate_parameters(self::execute_parameters(), [
'query' => $query,
]);
$query = $params['query'];
$query = clean_param($params['query'], PARAM_TEXT);

// Validate context.
$context = \context_system::instance();
Expand Down Expand Up @@ -106,7 +105,7 @@ public static function execute(string $query): array {
/**
* Describes the external function result value.
*
* @return external_description
* @return \external_description
*/
public static function execute_returns(): \external_description {

Expand Down

0 comments on commit cb9583c

Please sign in to comment.