learnweb / moodle-repository_owncloud

[ARCHIVE] Starting Moodle 3.6, our plugin ships with Moodle! :tada: Use this:
https://docs.moodle.org/en/Nextcloud_repository
GNU General Public License v3.0
8 stars 8 forks source link

Concentrate path handling responsibility into owncloud_client #6

Closed Dagefoerde closed 6 years ago

Dagefoerde commented 7 years ago

Path handling is currently split between lib.php and classes/owncloud_client.php. In my opinion, only the latter should be concerned with subpath handling for a) locating the base of an owncloud installation (e.g. /owncloud/) b) locating the WebDAV base within an installation (e.g. /remote.php/webdav/).

As both are part of the WebDAV's ls() / PROPFIND responses, get_listing still processes these elements out in lib.php. This should be moved into classes/owncloud_client.php (elegantly, if possible :) ).

----- OLD TEXT (for archiving purposes) ------- Currently, weird slashes are happening:

Also, handling of paths and subpaths should completely be moved into owncloud_client. The repository should not need to care about this.

Currently, problems occur if ownCloud/Nextcloud is installed in a subdirectory; the current code cannot handle this (assumes a root dir installation only).

Dagefoerde commented 7 years ago

Currently, problems occur if ownCloud/Nextcloud is installed in a subdirectory; the current code cannot handle this (assumes a root dir installation only).

This part seems to be resolved, but requires thorough testing.

Dagefoerde commented 7 years ago

Commit 20cb04b resolves most of the former points (especially the slashes issue), but get_listing remains rather ugly. I updated the issue description accordingly but consider the remainder an enhancement; not a bug.

Dagefoerde commented 6 years ago

Closing as invalid, because starting from the next release we stop maintaining an own owncloud_client. It will remain for a while to keep M3.3 backward compatibility, but it should not contain own functionality anymore.