Commit Graph

21 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
70ae75674d MDL-51863 packer: ensure empty zip files behavior remains consistent
With PHP bug #70322 fixed, ZipArchive::close() did start returning false
and throwing PHP Warnings with recent PHP versions (5.6.14 and up).
Previously (5.6.13 verified) it was returning true, and false in older
versions (5.4.x verified).

This change does silent the 2 "hacky" calls to close() that we perform
in core leaving the 3rd one (used for files having files) unmodified.

A new unit test has been created to cover the close() behavior, ideally
supporting both old and new PHP versions without harcoding any PHP
version.

Note that we don't use to rely much on results coming from close(), and
that's a good thing given the buggy behavior commented above. This just
keeps empty zips working like they were before.
2015-10-26 21:16:54 +01:00
Mitsuhiro Yoshida
6396b58e15 MDL-49259 lib: Fix for unzipped Japanese filename character corruption 2015-02-25 23:29:02 +09:00
Petr Škoda
9c140a681e MDL-44300 force PHP 5.6.x to return raw file names for our own guessing 2014-03-17 12:34:02 +13:00
sam marshall
71ab7e512b MDL-41151 Files: Zip packer should have way to indicate progress 2013-09-05 16:41:57 +01:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Petr Škoda
e8875a86be MDL-40900 do not use 32bit unsigned integers
32bit PHP and any Windows PHP breaks otherwise.
2013-07-28 13:10:57 +02:00
Paul Nicholls
f384ce26c0 MDL-39339 - zip_archive should ignore system files
zip_archive should ignore OSX system files (__MACOSX, .DS_Store) and
Windows thumbnail cache files (Thumbs.db), to avoid issues and confusion.
2013-05-30 09:23:35 +12:00
Petr Škoda
231b022777 MDL-37407 add support for zh_cn unicode unzip 2013-01-25 15:55:52 +01:00
Petr Škoda
009f190c69 MDL-37429 hack around zip limitations in PHP versions < 5.3.10 2013-01-17 16:48:29 +01:00
Petr Škoda
01b4040a27 MDL-37429 zipping improvements
Changes:
* zip_packer can create empty zip archives
* new option to ignore problematic files when creating archive
* detection of non-existent files
* debugging messages for opening of faulty zip archives
* coding style improvements
* no PHP 5.2 hacks
* more unit tests
2013-01-12 14:58:26 +01:00
Vadim Dvorovenko
697ade2850 MDL-32639 files: Removing '0' start folder in archives created with filemanager 2012-12-10 12:30:29 +08:00
Petr Škoda
177ffd37ff MDL-35795 add fallback for DOS/Windows non-utf8 zip archive unzipping 2012-10-06 10:02:11 +02:00
Petr Škoda
00f744d2b1 MDL-33753 fix sloppy refactoring regression in zip tweaking 2012-07-11 11:10:19 +02:00
Petr Skoda
6fb8ae95f5 MDL-33753 support utf-8 filename unzipping 2012-07-06 08:03:38 +02:00
Petr Skoda
79c966cf21 MDL-33710, MDL-33710 add utf-8 flag to all zip files created in moodle and unzip from storage fix 2012-07-06 08:02:42 +02:00
Dongsheng Cai
d2b7803e5a MDL-30973 Files API, check and update DocBlock 2012-02-15 12:48:57 +08:00
Petr Skoda
ac6f1a82f9 MDL-24321 switching to stdClass 2010-09-21 07:57:42 +00:00
Petr Skoda
8a680500c6 fixed phpdocs and incorrect exception names 2010-09-18 10:31:31 +00:00
Petr Skoda
05f2d18ba2 MDL-18431 use of ZIPARCHIVE::OVERWRITE changed in 5.2.8 - credit goes to Dan Marsden 2010-09-10 21:19:31 +00:00
Petr Skoda
c311889cc0 MDL-18431 use of ZIPARCHIVE::OVERWRITE changed in 5.2.8 2010-09-10 21:18:31 +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