Skip to content

Commit 0c1b04d

Browse files
author
Chris Proud
authored
[+] ENV PMA_UPLOADDIR and PMA_SAVEDIR
1 parent 905cae8 commit 0c1b04d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

config.inc.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
'PMA_QUERYHISTORYMAX',
2626
'MAX_EXECUTION_TIME',
2727
'MEMORY_LIMIT',
28+
'PMA_UPLOADDIR',
29+
'PMA_SAVEDIR',
2830
];
2931

3032
foreach ($vars as $var) {
@@ -137,8 +139,13 @@
137139
$i--;
138140

139141
/* Uploads setup */
140-
$cfg['UploadDir'] = '';
141-
$cfg['SaveDir'] = '';
142+
if (isset($_ENV['PMA_UPLOADDIR'])) {
143+
$cfg['UploadDir'] = trim($_ENV['PMA_UPLOADDIR']);
144+
}
145+
146+
if (isset($_ENV['PMA_SAVEDIR'])) {
147+
$cfg['SaveDir'] = trim($_ENV['PMA_SAVEDIR']);
148+
}
142149

143150
if (isset($_ENV['MAX_EXECUTION_TIME'])) {
144151
$cfg['ExecTimeLimit'] = $_ENV['MAX_EXECUTION_TIME'];

0 commit comments

Comments
 (0)