1
0
Fork 0

Remove deprecated App::getHostName() - process methods to DI::baseUrl()->getHostName()

This commit is contained in:
Philipp Holzer 2019-12-16 00:47:24 +01:00
commit 50be94aa5e
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
23 changed files with 34 additions and 50 deletions

View file

@ -482,8 +482,6 @@ function get_server()
function get_temppath()
{
$a = \get_app();
$temppath = Config::get("system", "temppath");
if (($temppath != "") && System::isDirectoryUsable($temppath)) {
@ -500,7 +498,7 @@ function get_temppath()
$temppath = BasePath::getRealPath($temppath);
// To avoid any interferences with other systems we create our own directory
$new_temppath = $temppath . "/" . $a->getHostName();
$new_temppath = $temppath . "/" . DI::baseUrl()->getHostname();
if (!is_dir($new_temppath)) {
/// @TODO There is a mkdir()+chmod() upwards, maybe generalize this (+ configurable) into a function/method?
mkdir($new_temppath);