Skip to content

Commit 3c3021a

Browse files
committed
MDL-79210 lib: Code adjustments to the PHPSpreadSheet 1.29.0
1 parent e55ecba commit 3c3021a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

lib/phpspreadsheet/readme_moodle.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Last release package can be found in https://github.com/PHPOffice/PhpSpreadsheet
44

55
NOTICE:
66
* Before running composer command, make sure you have the composer version updated.
7-
* Composer version 2.5.1 2022-12-22 15:33:54
7+
* Composer version 2.5.5 2023-03-21 11:50:05
88

99
STEPS:
1010
* Create a temporary folder outside your moodle installation

lib/phpspreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php

+6
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ public static function realpath(string $filename): string
114114
*/
115115
public static function sysGetTempDir(): string
116116
{
117+
// Moodle hack!
118+
if (function_exists('make_temp_directory')) {
119+
$temp = make_temp_directory('phpspreadsheet');
120+
return realpath(dirname($temp));
121+
}
122+
117123
$path = sys_get_temp_dir();
118124
if (self::$useUploadTempDirectory) {
119125
// use upload-directory when defined to allow running on environments having very restricted

lib/thirdpartylibs.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<location>phpspreadsheet</location>
5555
<name>PhpSpreadsheet</name>
5656
<description>Library to read, write and create spreadsheet documents in PHP.</description>
57-
<version>1.28.0</version>
57+
<version>1.29.0</version>
5858
<license>MIT</license>
5959
<repository>https://github.com/PHPOffice/PhpSpreadsheet</repository>
6060
<customised/>

0 commit comments

Comments
 (0)