36 Commits

Author SHA1 Message Date
Jake Dallimore
e5fca6909e MDL-81060 core: fix incorrect userquota usage in zip_packer
This change reverts much of MDL-74641, removing the erroneous userquota
checks from zip_packer. Now, during extraction, the zip_packer will exit
with an error status when it encounters a file which is larger than its
advertised size, and NOT when it determines the size of the extracted
files have exceeded the userquota (which only applies to private files
and which was used incorrectly here). It also reverts changes to the
draftfiles_ajax.php file, restoring the original (pre-MDL-74641) error
handling.
2024-04-08 09:08:24 +07:00
meirzamoodle
9ba1423359 MDL-74641 repository: Handles increase bytes while extracting zip files
We should not rely solely on the provided size information.
Therefore the system needs to recalculate the size of each file in the zip file,
whether small or big.

The changes also cover the filemanager.js file if an error appears.
2024-02-07 02:34:19 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Paul Holden
582bb534c9 MDL-37802 repository: return error if unzipping files fails.
For instance, when a user tried to unzip a password protected zip
archive using the file manager.
2020-09-25 09:33:44 +01:00
Mihail Geshoski
cb72d845f5 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:26 +02:00
Peter Dias
31788c8cf2 MDL-68758 core_repository: Allow ability to download files on all views. 2020-05-27 14:20:15 +08:00
Peter
a216d86c6c MDL-33671 core: Add ability to download selected items
Utilise the new checkbox-toggleall functionality
2020-03-03 07:20:35 +08:00
Peter
2f03923602 MDL-33671 core: Allow for bulk delete of files
* Enable bulk delete in a details view
* Behat tests for new functionality
* Unit test for new function
2020-03-03 07:20:35 +08:00
Ankit Agarwal
0601e0eef6 MDL-40402 libraries: Replace get_system_context() with context_system::instance() in core 2013-07-04 15:41:06 +08:00
Marina Glancy
bfa8ff6301 MDL-39177 make sure we don't remove existing directories when cleaning up unzip 2013-05-23 19:15:47 +10:00
Marina Glancy
da4b1ee480 MDL-39177 New function file_storage::get_unused_dirname() 2013-05-17 13:43:45 +10:00
Marina Glancy
77c21e6d0d MDL-39177 Ensure files are overwritten correctly on unzip 2013-05-17 13:43:45 +10:00
Marina Glancy
f7c588d226 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-17 13:43:45 +10:00
Frederic Massart
c24cd39448 MDL-32639 files: Zipping a folder does not overwrite existing files 2012-12-12 14:38:23 +08:00
Frederic Massart
638d72cd0b MDL-32639 files: Improved File Manager download and zip support 2012-12-12 14:38:11 +08:00
Vadim Dvorovenko
697ade2850 MDL-32639 files: Removing '0' start folder in archives created with filemanager 2012-12-10 12:30:29 +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
21c08c63ca MDL-34458 Librairies: Replaced deprecated get_context_instance() 2012-07-24 16:58:17 +08:00
David Mudrak
b53fad1e8b MDL-33098 filemanager now stores the new author field correctly 2012-05-21 11:57:56 +08:00
Marina Glancy
55e868053c MDL-32867: changed renaming of folders to the new API (function 'rename'), removed unused code 2012-05-21 11:57:55 +08:00
Marina Glancy
9dbdf31f8c MDL-32867 Display a list of references pointing to the file in filemanager 2012-05-21 11:57:54 +08:00
Marina Glancy
6dd299befa MDL-31901, MDL-28666 merged files API changes 2012-05-21 11:57:53 +08:00
Marina Glancy
9a62f7799b MDL-32867 Working with external references in filemanager
- Files that are references to external resources have special shortcut icon in filemanager
- When user selects a REF file in filemanager, he can see the 'Original' of the file in the way that original repository wants to show it, it is loaded dynamically via AJAX request
- Files that are themselves the source of references of other files in the system have 'link' icon in filemanager. When user tries to remove/rename/overwrite SRC file he is warned that all ## existing references will be updated/converted to copies.
- Changed confirmation messages for deleting, moving/renaming of the folders
- confirmation dialog in filemanager is using YUI3 now
2012-05-21 11:57:53 +08:00
Marina Glancy
c092681b4b MDL-31901: Updating/moving files in FileManager
- added new functions to the backend (repository/draftfiles_ajax.php) to allow changing of file name, location, license and author in one request
- enabled changing file properties using JS UI (lib/form/filemanager.js)
2012-05-21 11:57:52 +08:00
Marina Glancy
e709ddd29c MDL-31901: Allow FileManager to re-use FilePicker JS code for view modes:
- when loading core_filepicker we extend the Node element with functions necessary to display files list in different view modes;
- repository/filepicker.js is changed to use those functions;
- FileManager now has three different view modes (icon view, tree view and table view), JS code is re-used from FilePicker;
- files in FileManager no longer have context menu, they have one popup Widget with different actions instead;
- Added more templates for JS code to FileManager, use similar CSS class names as FilePicker;
- lib/filelib.php : fixed double slashes in path, return more data about files;
- lib/form/filemanager.php : pass information to FileManager about available licenses and default author;
- repository/draftfiles_ajax.php : return information about directory tree for file moving UI in FileManager, return formatted information;
- repository/lib.php : function repository::prepare_listing() now can work also with draftarea files listing;
2012-05-21 11:57:52 +08:00
Davo Smith
910e1ecdaa MDL-31113 filemanager element - refresh file list from server on load and prevent revertion to browser drag and drop behaviour when max files reached 2012-01-19 19:28:16 +00:00
Petr Skoda
431ac39634 MDL-26623 fix file permissions
The permissions are now going to be verified as part of the weekly release process.
2011-03-01 12:26:49 +01:00
Petr Skoda
6bdfef5da9 MDL-24321 switching to standard stdClass() 2010-09-21 08:54:01 +00:00
Petr Skoda
a27ab6fdfb MDL-24321 switching to stdClass in /repository/ 2010-09-21 08:22:04 +00:00
Aparup Banerjee
ea62bb3e37 assignment MDL-23820 fixed broken file manager UI, have set the page context => related to MDL-23797 2010-08-18 06:37:32 +00:00
Petr Skoda
bce08d9a37 MDL-23739 improved ajax headers - now using application/json with the exception of YUI upload 2010-08-10 08:50:08 +00:00
Dongsheng Cai
5ad337c86c MDL-23261, fixed deleting folders 2010-07-14 10:09:19 +00:00
Dongsheng Cai
eacae660b9 MDL-14589, added filepath 2010-07-13 03:05:30 +00:00
Petr Skoda
50a8bd6c1d MDL-14589 file api cleanup 2010-07-11 13:30:33 +00:00
Petr Skoda
54da2ec7a9 MDL-23066 directory renaming and moving in file manager 2010-07-10 10:03:01 +00:00
Petr Skoda
64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00