Merge branch '1612-spool' of github.com:annando/friendica into 1612-spool
This commit is contained in:
commit
c5d571287c
2 changed files with 38 additions and 4 deletions
23
boot.php
23
boot.php
|
|
@ -2365,6 +2365,29 @@ function get_lockpath() {
|
|||
return "";
|
||||
}
|
||||
|
||||
function get_spoolpath() {
|
||||
$spoolpath = get_config('system','spoolpath');
|
||||
if (($spoolpath != "") AND is_dir($spoolpath) AND is_writable($spoolpath))
|
||||
return($spoolpath);
|
||||
|
||||
$temppath = get_temppath();
|
||||
|
||||
if ($temppath != "") {
|
||||
$spoolpath = $temppath."/spool";
|
||||
|
||||
if (!is_dir($spoolpath))
|
||||
mkdir($spoolpath);
|
||||
elseif (!is_writable($spoolpath))
|
||||
$spoolpath = $temppath;
|
||||
|
||||
if (is_dir($spoolpath) AND is_writable($spoolpath)) {
|
||||
set_config("system", "spoolpath", $spoolpath);
|
||||
return($spoolpath);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function get_temppath() {
|
||||
$a = get_app();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue