mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle
This commit is contained in:
commit
3278ce7aba
1147 changed files with 2621 additions and 2617 deletions
6
files/classes/external/delete/draft.php
vendored
6
files/classes/external/delete/draft.php
vendored
|
@ -52,7 +52,7 @@ class draft extends external_api {
|
|||
* @return external_function_parameters
|
||||
* @since Moodle 3.10
|
||||
*/
|
||||
public static function execute_parameters() : external_function_parameters {
|
||||
public static function execute_parameters(): external_function_parameters {
|
||||
return new external_function_parameters (
|
||||
[
|
||||
'draftitemid' => new external_value(PARAM_INT, 'Item id of the draft file area'),
|
||||
|
@ -76,7 +76,7 @@ class draft extends external_api {
|
|||
* @return array of warnings and parent paths of the files deleted
|
||||
* @since Moodle 3.10
|
||||
*/
|
||||
public static function execute(int $draftitemid, array $files) : array {
|
||||
public static function execute(int $draftitemid, array $files): array {
|
||||
global $CFG, $USER;
|
||||
require_once($CFG->dirroot . '/repository/lib.php');
|
||||
|
||||
|
@ -103,7 +103,7 @@ class draft extends external_api {
|
|||
* @return external_single_structure
|
||||
* @since Moodle 3.10
|
||||
*/
|
||||
public static function execute_returns() : external_single_structure {
|
||||
public static function execute_returns(): external_single_structure {
|
||||
return new external_single_structure(
|
||||
[
|
||||
'parentpaths' => new external_multiple_structure(
|
||||
|
|
6
files/classes/external/get/unused_draft.php
vendored
6
files/classes/external/get/unused_draft.php
vendored
|
@ -51,7 +51,7 @@ class unused_draft extends external_api {
|
|||
* @return external_function_parameters
|
||||
* @since Moodle 3.11
|
||||
*/
|
||||
public static function execute_parameters() : external_function_parameters {
|
||||
public static function execute_parameters(): external_function_parameters {
|
||||
return new external_function_parameters ([]);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class unused_draft extends external_api {
|
|||
* @return array of information containing the draft item area and possible warnings.
|
||||
* @since Moodle 3.11
|
||||
*/
|
||||
public static function execute() : array {
|
||||
public static function execute(): array {
|
||||
global $USER;
|
||||
|
||||
$usercontext = context_user::instance($USER->id);
|
||||
|
@ -83,7 +83,7 @@ class unused_draft extends external_api {
|
|||
* @return external_single_structure
|
||||
* @since Moodle 3.11
|
||||
*/
|
||||
public static function execute_returns() : external_single_structure {
|
||||
public static function execute_returns(): external_single_structure {
|
||||
return new external_single_structure(
|
||||
[
|
||||
'component' => new external_value(PARAM_COMPONENT, 'File area component.'),
|
||||
|
|
|
@ -57,7 +57,7 @@ class provider implements
|
|||
* @param collection $collection The initialised collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
|
||||
$collection->add_database_table('files', [
|
||||
'contenthash' => 'privacy:metadata:files:contenthash',
|
||||
|
@ -92,7 +92,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
$sql = "SELECT ctx.id
|
||||
FROM {user_private_key} k
|
||||
JOIN {user} u ON k.userid = u.id
|
||||
|
|
|
@ -51,7 +51,7 @@ class provider implements
|
|||
* @param collection $collection The initialised collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
$collection->add_plugintype_link('fileconverter', [], 'privacy:metadata:plugintypefileconverter');
|
||||
return $collection;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return \contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : \core_privacy\local\request\contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): \core_privacy\local\request\contextlist {
|
||||
// We cannot associate files with a particular user as it would require to know all the details about
|
||||
// the source file, which only the component owning it knows about. And, the 'usermodified' attribute
|
||||
// of the conversion class is not an identifier of data ownership, merely that this user was logged in
|
||||
|
|
|
@ -50,7 +50,7 @@ class provider implements
|
|||
* @param collection $collection The initialised collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
$collection->add_external_location_link('googledrive', [
|
||||
'params' => 'privacy:metadata:fileconverter_googledrive:params',
|
||||
'filecontent' => 'privacy:metadata:fileconverter_googledrive:filecontent',
|
||||
|
@ -65,7 +65,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
$contextlist = new contextlist();
|
||||
return $contextlist;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -534,7 +534,7 @@ class core_files_renderer extends plugin_renderer_base {
|
|||
*
|
||||
* @return \stdClass $iconcontext the context for rendering license help info.
|
||||
*/
|
||||
protected function create_license_help_icon_context() : stdClass {
|
||||
protected function create_license_help_icon_context(): stdClass {
|
||||
$licensecontext = new stdClass();
|
||||
|
||||
$licenses = [];
|
||||
|
|
|
@ -786,7 +786,7 @@ class core_file_converter_requirements_base implements \core_files\converter_int
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_supported_conversions() {
|
||||
public function get_supported_conversions() {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue