Merge pull request #1808 from annando/issue-1421
The temp path now contains the host name
This commit is contained in:
commit
b4845230bf
15
boot.php
15
boot.php
|
@ -1619,9 +1619,9 @@ if(! function_exists('load_contact_links')) {
|
|||
$url = normalise_link($rr['url']);
|
||||
$ret[$url] = $rr;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
$ret['empty'] = true;
|
||||
|
||||
$a->contacts = $ret;
|
||||
return;
|
||||
}
|
||||
|
@ -1659,8 +1659,7 @@ function explode_querystring($query) {
|
|||
if($arg_st !== false) {
|
||||
$base = substr($query, 0, $arg_st);
|
||||
$arg_st += 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$base = '';
|
||||
$arg_st = 0;
|
||||
}
|
||||
|
@ -1805,15 +1804,23 @@ function get_lockpath() {
|
|||
}
|
||||
|
||||
function get_temppath() {
|
||||
$a = get_app();
|
||||
|
||||
$temppath = get_config("system","temppath");
|
||||
if (($temppath != "") AND is_dir($temppath) AND is_writable($temppath))
|
||||
return($temppath);
|
||||
|
||||
$temppath = sys_get_temp_dir();
|
||||
if (($temppath != "") AND is_dir($temppath) AND is_writable($temppath)) {
|
||||
$temppath .= "/".$a->get_hostname();
|
||||
if (!is_dir($temppath))
|
||||
mkdir($temppath);
|
||||
|
||||
if (is_dir($temppath) AND is_writable($temppath)) {
|
||||
set_config("system", "temppath", $temppath);
|
||||
return($temppath);
|
||||
}
|
||||
}
|
||||
|
||||
return("");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue