Skip to content

Commit

Permalink
mod_collabora: fix wrong sort param in get_area_files
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Grabs committed Nov 4, 2024
1 parent 2bad63e commit c94a7d3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ moodle-mod_collabora
Changes
-------

### v4.5.1
* 2024-11-04 - Fix wrong sort param int get_area_files while loading the current group file.

### v4.5.0
* 2024-10-30 - Add support for managing templates.

Expand Down
3 changes: 2 additions & 1 deletion backup/moodle2/restore_collabora_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ protected function fix_file_timestamps($cm) {
'mod_collabora',
collabora_fs::FILEAREA_GROUP,
false,
'filename',
// The sorting is important because of the way we store document versions.
'filepath',
false
);
// Set the timemodified field to the value from the filepath which represents the version.
Expand Down
3 changes: 2 additions & 1 deletion classes/api/base_filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ public function get_version_files() {
$this->file->get_component(), // Param component.
$this->file->get_filearea(), // Param filearea.
$this->file->get_itemid(), // Param itemid.
'filename', // Param sort.
// The sorting is important because of the way we store document versions.
'filepath', // Param sort.
false // Param includedirs.
);
$result = [];
Expand Down
3 changes: 2 additions & 1 deletion classes/api/collabora_fs.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ private function create_retrieve_file() {
'mod_collabora', // Param component.
self::FILEAREA_GROUP, // Param filearea.
$this->groupid, // Param itemid.
'filename', // Param sort.
// The sorting is important because of the way we store document versions.
'filepath', // Param sort.
false, // Param includedirs.
0, // Param updatedsince.
0, // Param limitfrom.
Expand Down
2 changes: 1 addition & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private function get_initial_file_link() {
$fs = get_file_storage();
$files = $fs->get_area_files(
$this->context->id, // Param contextid.
'mod_collabora', // Param component
'mod_collabora', // Param component.
collabora_fs::FILEAREA_INITIAL, // Param filearea.
false, // Param itemid.
'', // Param sort.
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
defined('MOODLE_INTERNAL') || die;

$plugin->version = 2024103000;
$plugin->release = 'v4.5.0 (2024103000)';
$plugin->version = 2024103001;
$plugin->release = 'v4.5.1 (2024110400)';
$plugin->requires = 2022111800; // Moodle 4.1.
$plugin->component = 'mod_collabora';
$plugin->maturity = MATURITY_BETA;

0 comments on commit c94a7d3

Please sign in to comment.