Commit Graph

372 Commits

Author SHA1 Message Date
Eric Merrill 4b8ed14f54 MDL-41907 Repositories: Maintain the sortorder of a file when overwriting it. 2013-09-19 18:47:42 -04:00
Matteo Scaramuccia c7aac02925 MDL-29218 Repository: fixed a typo in the PHPDoc 2013-09-02 23:26:51 +02:00
Matteo Scaramuccia 832a19829b MDL-29218 Repository: $pname, get rid of all the useless code
More details in the Tracker.
2013-09-02 23:26:49 +02:00
Matteo Scaramuccia d0ddf08dc0 MDL-29218 Repository: Hide the repo if repository::plugin_init returns false 2013-09-02 23:26:48 +02:00
Frederic Massart f4f853f8cd MDL-38314 repository: Removed >= 2.5 code logic 2013-07-08 16:40:21 +08:00
Frederic Massart d8732ee8b7 MDL-38314 repository: Delete repository instances on context deletion 2013-07-03 16:27:08 +08:00
Dan Poltawski e4737333eb Merge branch 'MDL-39667-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-06-10 12:51:44 +08:00
Frederic Massart 235aa1b1d1 MDL-39667 repository: Correct check for uniqueness of the name 2013-05-14 16:29:20 +08:00
Marina Glancy 949a68d987 MDL-39177 Discard file origin when moving/renaming a file in filemanager
Created one function that handles file update to be used from both JS and nonJS filepicker
2013-05-14 17:05:39 +10:00
Marina Glancy 7a73b806c3 MDL-39177 Original info is not preserved when overwriting a file in filemanager
original file location is used by filemanager to indicate that file is a source of reference and file the list of referencing files
2013-05-14 17:05:39 +10:00
Marina Glancy eb30de6812 MDL-39177 File reference is not updated when overwriting the file 2013-05-14 17:05:38 +10:00
Frederic Massart 7b6ed67e0a MDL-38500 repository: Instance names must be unique 2013-05-01 16:14:39 +08:00
Ruslan Kabalin 414095a014 MDL-34939: Fix clamdscan permissions-related issues
Use --fdpass parameter that passes the file descriptor permissions to clamd,
which allows to scan given file irrespective of directory and file
permissions. Changing file permissions is not required.
2013-04-24 14:59:19 +08:00
Frederic Massart 6c402aa73d MDL-38452 repositories: User logged in as have access to non-private repositories 2013-03-20 13:32:43 +08:00
Frederic Massart abf0c9fc9e MDL-38474 repository: Undefined variable 2013-03-15 13:00:35 +08:00
Frederic Massart 7c78db604b MDL-38474 repository: Correct context when checking permissions to access a repository 2013-03-15 10:04:50 +08:00
Frederic Massart 2498509cfd MDL-37852 repository: Prevent undesired access to repositories settings 2013-03-05 09:56:19 +01:00
Frederic Massart 6153c8040d MDL-36426 repository: Prevent login_as() users to access 2013-03-04 02:38:32 +01:00
Frederic Massart 68acd1157e MDL-33766 files: Improved validation of areamaxbytes 2012-11-01 16:47:06 +08:00
Dan Poltawski aed58a3da8 Merge branch 'MDL-35990-master' of git://github.com/FMCorz/moodle 2012-10-29 14:32:11 +08:00
Frederic Massart e56de3a4d1 MDL-35990 repository: Added MOODLE_INTERNAL check and removed config inclusion 2012-10-16 14:01:29 +08:00
Matteo Scaramuccia c67f1a342c MDL-35990 Repository Library should not include the main config.php file 2012-10-16 13:54:23 +08:00
Frederic Massart 8136753abf MDL-35892 repository: prepare_listing recursively prepares the data 2012-10-15 09:46:04 +08:00
Eloy Lafuente (stronk7) 92b75df804 Merge branch 'MDL-34945-master' of git://github.com/FMCorz/moodle 2012-09-06 20:11:53 +02:00
Eloy Lafuente (stronk7) 69689b4c3e Merge branch 'wip-MDL-34290-master' of git://github.com/marinaglancy/moodle 2012-08-29 12:11:00 +02:00
Marina Glancy bc6f241ca2 MDL-34290 repository API: add repository function to import referenced file
it must be independed from sync_external_file because sync often does not actually download contents, it is used just to retrieve
the size of the file. Besides the timeouts for get_file and sync requests are very different.

Also add option to send_stored_file() to ignore reference and send cached contents
2012-08-29 11:56:15 +08:00
Marina Glancy 72a5655566 MDL-34290 repository API: add timeout to get_file and throw exception
- get_file should have a request timeout and throw an exception with the details (i.e. timeout reached) if download can
not be completed
- corrected phpdocs
2012-08-29 11:56:14 +08:00
Marina Glancy 59cb759850 MDL-34290 repository API: do not confuse source and reference
make sure that repository function get_file_source_info receives as argument the source of the file,
and get_file receives a reference;
reference is a value of DB field files_reference.reference and result of get_file_reference(source).
Fix dropbox as the only repository that have different values in those fields;
also added information about user in dropbox reference and original
2012-08-29 11:56:14 +08:00
Marina Glancy 2d222a3243 MDL-34290 repository API: allow get_file_by_reference return only filesize
we want to allow repositories to perform quick synchronisation, without downloading the file. In this case they return
only filesize, without the contenthash
2012-08-29 11:56:07 +08:00
Ankit Agarwal 5fbe2118bc MDL-34549 libraries: Changing strictness of context::instance_by_id() when required 2012-08-24 11:30:35 +08:00
Ankit Agarwal d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Frederic Massart 2c86955027 MDL-34945 Repository: Creating an instance requires the user to have the permission to view it 2012-08-24 10:55:22 +08:00
Paul Nicholls ec3eaa2c38 MDL-33640 - change $templatesinitialized to an array; improve naming and automate use of template
* $templatesinitialized is now an array, so that subsequent calls to initialise_filepicker which request different repositories will include those (and only those) templates which it requires but have not yet been included
* The get_template method has also been renamed to get_upload_template (and the template to "uploadform_" followed by the repository type), since it only applies to upload forms
* If a plugin provides a get_upload_template method, the template it returns will now automatically be used instead of the standard uploadform template when generating an upload form
2012-08-09 09:47:40 +12:00
Paul Nicholls 013cf2878c MDL-33640 - Add ability to use custom filepicker templates
Allow repository plugins to register a template by defining a get_template() method, coupled with the ability to request the template be used by create_upload_form() instead of the standard 'uploadform' template.  The template is automatically registered using the plugin's name, and core templates will override any which clash; this also means that a theme can override these templates in a custom renderer if it wants to.
2012-08-08 13:50:47 +12:00
Frederic Massart bb9ea890f6 MDL-34507 Repository: Better support for 'any' accepted filetypes 2012-07-27 10:01:27 +08:00
Frederic Massart 21c08c63ca MDL-34458 Librairies: Replaced deprecated get_context_instance() 2012-07-24 16:58:17 +08:00
Rajesh Taneja 405aca3532 MDL-32942 libraries: Replaced deprecated PARAM_ACTION and PARAM_FORMAT with PARAM_ALPHANUMEXT 2012-07-19 15:46:10 +08:00
Marina Glancy 6dc82385ab MDL-33950 Correctly initialise repository and check access in js and non-js filepicker 2012-07-06 09:44:07 +08:00
Marina Glancy 1bd0174743 MDL-33950 check if source file is accessible in repository_ajax.php
- repository::copy_to_area() does not check access any more, and repository_recent::copy_to_area() is unnecessary
- added repository::file_is_accessible() that checks access to the picked file (regardless of accessibility of the file it is referencing to)
2012-07-06 09:44:07 +08:00
Marina Glancy c8161eec94 MDL-33997 Repository should not support references by default 2012-06-25 16:03:25 +08:00
Sam Hemelryk 92e0842978 Merge branch 'MDL-33808' of git://github.com/danpoltawski/moodle 2012-06-21 10:19:05 +12:00
Marina Glancy 83d2700ec9 MDL-33832 Fixed filling of files.source field
- also supress the error on unserialise (because people already may have broken files.source field)
- also display details about unparseable JSON error
- make source field look the same across repositories
2012-06-20 16:09:37 +08:00
Dan Poltawski 8655fb96cf MDL-33808 - format title on the repository instance screen 2012-06-19 12:10:56 +08:00
Dan Poltawski 102f928621 MDL-33808 - incorrect cleaning of repository names 2012-06-19 11:27:04 +08:00
Dongsheng Cai d6453211b6 MDL-33513: Make files->source field consistent 2012-06-15 14:51:07 +08:00
Dan Poltawski 4585e6ac98 Merge branch 'wip-MDL-33550-master' of git://github.com/marinaglancy/moodle 2012-06-14 16:23:08 +08:00
Marina Glancy 6fd1cf05b0 MDL-33550 reset repository static cache between unit tests 2012-06-14 16:21:04 +08:00
Dan Poltawski 414ce30812 Revert MDL-33513
This reverts commit b2cf2b807f.
This reverts commit 24b96f0170.
This reverts commit 39c60294a6.
This reverts commit 8a288971e2.
2012-06-14 13:57:45 +08:00
Dan Poltawski cd925ac79b Merge branch 'dev_MDL-33513_files_source' of git://github.com/danpoltawski/moodle 2012-06-14 11:12:21 +08:00
Dan Poltawski b2cf2b807f MDL-33513 repositories - fix misleading phpdocs 2012-06-14 10:55:30 +08:00