Skip to content

Commit da956b3

Browse files
committed
Fix moving pepper to config.json
1 parent fef7118 commit da956b3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ data/conf.php
1818
src/import/*
1919
.gitignore
2020
.dockerignore
21+
src/inc/conf.php

src/inc/confv2.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
}
1616

1717
// if a pepper is set from an older version, we have to save it to the new file location
18-
if (isset($PEPPER) && !file_exists($DIRECTORIES['config'] . "/pepper.json")) {
19-
file_put_contents($DIRECTORIES['config'] . "/pepper.json", json_encode($PEPPER));
18+
if (isset($PEPPER) && !file_exists($DIRECTORIES['config'] . "/config.json")) {
19+
file_put_contents($DIRECTORIES['config'] . "/config.json", json_encode(array('PEPPER' => $PEPPER)));
2020
}
2121
} else {
2222
// read env variables (when running with docker-compose)
@@ -45,5 +45,6 @@
4545
}
4646

4747
// load data
48-
$PEPPER = json_decode(file_get_contents($DIRECTORIES['config'] . "/pepper.json"));
48+
$CONFIG = json_decode(file_get_contents($DIRECTORIES['config'] . "/config.json"), true);
49+
$PEPPER = $CONFIG['PEPPER'];
4950
}

src/inc/load.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
Util::randomString(32),
8888
Util::randomString(32)
8989
];
90-
file_put_contents($DIRECTORIES['config'] . "/pepper.json", json_encode($PEPPER));
90+
file_put_contents($DIRECTORIES['config'] . "/config.json", json_encode(array('PEPPER' =>$PEPPER)));
9191
}
9292

9393
// save version and build

0 commit comments

Comments
 (0)