Commit graph

178 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
294d976e28 MDL-33326 filestorage tests: Coding style fixes 2012-05-30 02:26:57 +02:00
Dan Poltawski
996f8b6442 MDL-33326 filestorage tests: Add more coverage 2012-05-30 02:26:46 +02:00
Dan Poltawski
7c89a18fca MDL-33326 filestorage tests: Actually verify results
Rather than the placeholder tests which were added before to trigger
DB incompatibilities
2012-05-30 02:26:36 +02:00
Dan Poltawski
e73b42ca57 Merge branch 'wip-MDL-33399-m23' of git://github.com/samhemelryk/moodle 2012-05-29 14:57:05 +08:00
Sam Hemelryk
9f4789b842 MDL-33399 files: Fixed up handling of empty sort in File API methods.
The following three methods of file_storage have been patched:
* get_external_files
* get_area_files
* get_directory_files
2012-05-29 16:38:47 +12:00
Dan Poltawski
995e479067 Merge branch 'wip-MDL-33338-master' of git://github.com/marinaglancy/moodle 2012-05-28 15:43:33 +08:00
Marina Glancy
4c2fcbfc85 MDL-33338 recognising the mimetype for uploaded files
- 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
2012-05-28 15:19:41 +08:00
Sam Hemelryk
63f2813497 Merge branch 'dev_MDL-33147_transaction' of git://github.com/dongsheng/moodle 2012-05-28 11:04:43 +12:00
Sam Hemelryk
6347a6216d MDL-33172: Fixed whitespace 2012-05-25 11:37:07 +12:00
Dan Poltawski
3447100cdb MDL-33172 - filestorage: Fix oracle incompatibilites
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
2012-05-25 11:17:56 +12:00
Dan Poltawski
ac29403e39 MDL-33172 - filestorage: Add unit test for breaking oracle functions 2012-05-25 11:17:56 +12:00
Marina Glancy
ae7f35b934 MDL-33144 display filetype icon and mimetype based on extension
- 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
2012-05-23 14:51:55 +08:00
Dan Poltawski
37eba7d5d6 Merge branch 'dev_MDL-33149_stored_file_access' of git://github.com/dongsheng/moodle 2012-05-22 16:51:33 +08:00
Dongsheng Cai
291a3d1fb6 MDL-33149 stored_file::repository should be private 2012-05-22 15:00:49 +08:00
Dongsheng Cai
e3c0211879 MDL-33147 Added transaction support for some Files APIs 2012-05-22 13:51:04 +08:00
Dan Poltawski
b99065be04 MDL-33032 - dont require repository/lib.php until necessary
This is an ugly fix to a broken installer only.
2012-05-21 20:04:42 +08:00
David Mudrak
10f0978bff MDL-32471 redefining the tinyicon thumbnail size to 24x24
As requested by the Files 2.3 UI team.
2012-05-21 11:37:29 +02:00
Marina Glancy
a8d6dda4f2 MDL-32247 fixed bug with displaying icon for unknown filetype, fixed merge mistakes 2012-05-21 17:12:55 +08:00
Dongsheng Cai
70c1bc843a MDL-33127 stored_file::update should use get_content_file_location because it tried to update file_record 2012-05-21 16:37:53 +08:00
Marina Glancy
559276b153 MDL-32247,MDL-32831,MDL-32900 Use correct url building of file type icons
- function get_mimetypes_array() now contains also information about filetype groups and language strings
- use 'smart' human-readable mimetype description
- never determine filetype group based on filetype icon image! remove function mimeinfo_from_icon()
- get rid of class filetype_parser and file lib/filestorage/file_types.mm, replaced with functions file_get_typegroup(), file_extension_in_typegroup() and file_mimetype_in_typegroup()
- support multiple icon sizes, not only 16 and 32
- retrieve filetype icon only using proper functions file_..._icon() from lib/filelib.php throughout the code
- increase size of repository thumbnails to 90 and icons to 24 (will take effect when new icons exist)
2012-05-21 16:01:04 +08:00
Dongsheng Cai
8177b7b9f0 MDL-33082 Detecting mimetype based on content bytes 2012-05-21 15:26:39 +08:00
Dongsheng Cai
61506a0af9 MDL-33032 Fixed issues for file integration
1. Added tracker issue number in comment
2. Fixed stored_file::delete_reference()
3. repository::send_file() will throw exception if not implemented by subclass
4. Fixed renaming unit test, added one unit test for deleting original file
5. Fixed copyright statement for googledoc and picasa repository plugin
6. Implemented stored_file::set_filesize()
2012-05-21 11:57:56 +08:00
Dongsheng Cai
fc4e8034fc MDL-32867 filemanager and repository
1. Allowing "." as filename, so filemanager can rename folder
2. Fixed import_external_file method
3. Disallow recent repository to list file references
2012-05-21 11:57:55 +08:00
Dongsheng Cai
04e3b007c2 MDL-28666 phpdoc improvements 2012-05-21 11:57:54 +08:00
Dongsheng Cai
462c4955f4 MDL-28666 file_storage::get_directory_files() supports references 2012-05-21 11:57:54 +08:00
Dongsheng Cai
7051415cca MDL-28666 Files API and db changes
1. Fix db regression
2. Unit tests for is_external_file() and rename exception
3. Searching reference method exclude draft files
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
b7725e30c2 MDL-32914 fixed function get_imageinfo() to get rid of notice messages 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
Dongsheng Cai
6723372514 MDL-28666 Extends repository to support references
1. Allow repository to create references to external contents
2. Extends files API to handle file references
3. Generic file caching
4. Backup/restore file references
5. Download external contents if repository uninstalled
6. Allow filepicker to display iframe
7. PHPUnit test suits
2012-05-21 11:57:51 +08:00
Petr Skoda
d5dd0540c2 MDL-26028 send_file performance improvements
Includes X-Sendfile support, ETags for stored_files and general cleanup.
2012-04-29 18:27:23 +02:00
David Mudrak
f7eec6ce79 MDL-32471 improved SQL to prevent potential full table scans 2012-04-25 13:44:36 +02:00
David Mudrak
94d104172e MDL-32471 just a trivial change to prevent eventual issues with various preview modes 2012-04-25 11:53:57 +02:00
David Mudrak
8f110835c1 MDL-32471 adding preview generation unit tests
The test image is a public domain file from
http://commons.wikimedia.org/wiki/File:Easter_eggs_-_onion_decoration.jpg
2012-04-25 11:42:17 +02:00
David Mudrak
fe68aac7d9 MDL-32471 using === for string comparison
Thanks to Petr Skoda for spotting this during the peer-review.
2012-04-24 16:10:46 +02:00
David Mudrak
9120a46257 MDL-32471 remove orphaned preview files via cron 2012-04-24 15:14:09 +02:00
David Mudrak
c4d19c5a07 MDL-32471 introducing file_storage::get_file_preview() method 2012-04-24 12:09:45 +02:00
Petr Skoda
f8311defeb MDL-31301 use static textlib methods 2012-03-03 11:46:13 +01:00
Eloy Lafuente (stronk7)
4ab641eeaa MDL-30973 Files API: Whitespace fixes 2012-03-01 00:56:23 +01:00
Dongsheng Cai
d2b7803e5a MDL-30973 Files API, check and update DocBlock 2012-02-15 12:48:57 +08:00
Aparup Banerjee
357317fb6e Merge branch 'MDL-27432_gd_error' of git://github.com/andyjdavis/moodle 2011-12-08 13:56:51 +08:00
Andrew Davis
6b2f218473 MDL-27432 mod_data: improved handling of the absence of the GD php extension 2011-11-28 12:58:44 +08:00
Aparup Banerjee
4cff8cb550 Merge branch 'MDL-28562_wip' of https://github.com/jamiepratt/moodle 2011-11-23 12:36:35 +08:00
Rossiani Wijaya
51803fd113 MDL-29955: filestorage/file_types: add support for .f4v, .m4v and .webm 2011-10-31 15:26:25 +08:00
Petr Skoda
31cd5fe8ef MDL-29867 fix invalid file author 2011-10-22 20:18:11 +02:00
Petr Skoda
260c4a5b09 MDL-29773 prevent negative unix timestamps in the files table 2011-10-14 15:52:49 +02:00
Petr Skoda
694f3b74c7 MDL-29773 use db debuginfo when file record insertion fails 2011-10-14 15:30:54 +02:00
Petr Skoda
65e9eac0d1 MDL-29401 fix forgotten area
Thanks Eloy!
2011-09-26 02:16:31 +02:00
Petr Skoda
aff24313be MDL-29401 introduce new frankenstyle PARAM types
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.
2011-09-25 09:59:55 +02:00
Tom Lanyon
7aa06e6ded MDL-28701 Change all uses of $CFG->dataroot/temp to $CFG->tempdir 2011-09-10 10:35:39 +02:00