- do not die with fatal error if source file in moodle internal repository is missing;
- moved code duplication for moodle repositories into class repository (functions send_file, get_reference_details, get_file_by_reference, get_file_reference);
- update file status after repository::sync_external_file so we know that it is missing (or not missing anymore). Do not run this function more than once for file within one request;
- display readable name for Private Files and Server files with the new format;
- display broken icon in filemanager if we know that source is missing, display information (for admin) where it was located before: see repository::get_reference_details() and extending classes;
- removed unnecessary queries in stored_file::sync_external_file();
- syncronize files before displaying it's size in mod_resource, do not query directly
Together with this, refactoring and cleanup of search_references() and
similar methods was done. SQL was improved to use the INNER JOIN instead
of the LEFT JOIN as we are really interested in records that have a
reference. Also, joining the {repository_instances} table assures that
only references with valid repository_instance are returned (the check
against is_external_file() can't be applied to the methods that return
the count of references so I dropped it completely).
This patch unifies the way how records in {files_reference} get created.
Previously, each reference file (i.e. a file with referencefileid set)
created its own record in {files_reference}. This patch makes sure that
existing record is reused if possible.
Bye bye 1:1 relationships, you suck!
- when file is uploaded in php, the tmpname does not have initial extension and mimetype recognition by extension fails
- another issue is that import form for questions fails with fatal error when it should just say that field is required
Fixes the following problems:
* When we select from two tables with the same named fields (id)
and ask to sort by that field, Oracle doesn't know which table to
sort frm unless that field is named in the SELECT. Here we do that
by explicitly naming the fields. This keeps compatibility with before
the reference table was added.
* Text comparisong without sql_compare_text
- use finfo to determine mimetype of a file only when it is unknown from file extension
- display filetype icon and mimetype in filemanager based on file extension
- fixed a small issue with specifying extension instead of group in file_get_typegroup()
- allow only web-compartible image types when embedding into editor or using in database field
- created new groups web_video and web_audio to use in resource module
1. Allowing "." as filename, so filemanager can rename folder
2. Fixed import_external_file method
3. Disallow recent repository to list file references
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
allowed turning off the http HEAD request timeout calculation with zero (or negative) bitrate
This was added in to allow servers that have a problem with
HEAD requests to carry on with the given timeout without re-calculations.
See PULL-651 for the discussion.
the optional argument to force recalculation of timeout has been forced within scorm/locallib.php
timeout re-calculation only increments timeout.