The call to the class 'repository' introduced in the commit d05c2ac7cc78
didn't fully work and threw: "Exception - Class 'repository' not found".
This fixes the missing library inclusion.
LTS (3.5) requires previous LTS (3.1)
This just deletes all the upgrade steps previous to 3.1.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.
Also includes an upgrade step to prevent upgrading from any
version < 2016052300 (v3.1.0) as anti-cheating measure.
Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
If the user decides to remove a repository all of the linked
files are now deleted along with file references. This was causing
problems such as the course page displaying an error with no recourse
to fix the problem.
When files are copied into the system account's drive, they are put into
folders respecting the structure of contexts. Folder names were based on
context names only and so were likely to collide (such as with users
with the same name).
The patch ads context instance identifiers to the name so that they can
be identified more reliably.
The values stored in these user preferences were valid for the old
flickr auth mechanism and are not usable any more. The new oauth1 based
version needs to store both the token (in the flickr_access_token
preference) and the token secret (flickr_access_token_secret). The new
version does not need to store the user's nsid.
The cryptic names of these legacy settings are a result of how dealing
with user preferences was originally implemented.
The patch makes the Flickr repository use the new oauth1 based client.
Beside that, other improvements include:
* Does not attempt to guess the photo URL any more. Instead uses
url_sq and url_o extras of the flickr.photos.search call.
* The photos.search does not return the information about the photo size
so we set it to null (previously was returned as 'unknown' which made
it be displayed as zero).
* Does not perform additional API request to obtain the manage URL, uses
https://www.flickr.com/photos/organize instead.
For historical reasons repositories need to call add_file_to_pool
to sync file records. However now that a before_file_created hook
has been added additional information is needed by add_file_to_pool.
Ideally add_file_to_pool and friends will become private/protected,
so we need to remove all uses of it in core.
This patch adds some new methods to the file class to allow syncing
to be managed internally by the file and the file_storage class.
This just deletes all the upgrade steps previous to 3.0.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.
Also includes an upgrade step to prevent upgrading from any
version < 2015111600 (v3.0.0) as anti-cheating measure.
Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
For work accounts we need to specify the auth headers, for personal accounts we cannot specify the auth headers.
We don't know which is which so we have to try both cases.