Standards ...
This commit is contained in:
parent
13150c09a5
commit
c97306e734
1 changed files with 10 additions and 3 deletions
13
boot.php
13
boot.php
|
@ -2365,20 +2365,27 @@ function get_lockpath() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the path where spool files are stored
|
||||||
|
*
|
||||||
|
* @return string Spool path
|
||||||
|
*/
|
||||||
function get_spoolpath() {
|
function get_spoolpath() {
|
||||||
$spoolpath = get_config('system','spoolpath');
|
$spoolpath = get_config('system','spoolpath');
|
||||||
if (($spoolpath != "") AND is_dir($spoolpath) AND is_writable($spoolpath))
|
if (($spoolpath != "") AND is_dir($spoolpath) AND is_writable($spoolpath)) {
|
||||||
return($spoolpath);
|
return($spoolpath);
|
||||||
|
}
|
||||||
|
|
||||||
$temppath = get_temppath();
|
$temppath = get_temppath();
|
||||||
|
|
||||||
if ($temppath != "") {
|
if ($temppath != "") {
|
||||||
$spoolpath = $temppath."/spool";
|
$spoolpath = $temppath."/spool";
|
||||||
|
|
||||||
if (!is_dir($spoolpath))
|
if (!is_dir($spoolpath)) {
|
||||||
mkdir($spoolpath);
|
mkdir($spoolpath);
|
||||||
elseif (!is_writable($spoolpath))
|
} elseif (!is_writable($spoolpath)) {
|
||||||
$spoolpath = $temppath;
|
$spoolpath = $temppath;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_dir($spoolpath) AND is_writable($spoolpath)) {
|
if (is_dir($spoolpath) AND is_writable($spoolpath)) {
|
||||||
set_config("system", "spoolpath", $spoolpath);
|
set_config("system", "spoolpath", $spoolpath);
|
||||||
|
|
Loading…
Reference in a new issue