From c97306e734227cf0499a6043d6d1ad2458b6f258 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 1 Dec 2016 22:50:07 +0000 Subject: [PATCH] Standards ... --- boot.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 9a766d41dc..4974512248 100644 --- a/boot.php +++ b/boot.php @@ -2365,20 +2365,27 @@ function get_lockpath() { return ""; } +/** + * @brief Returns the path where spool files are stored + * + * @return string Spool path + */ function get_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); + } $temppath = get_temppath(); if ($temppath != "") { $spoolpath = $temppath."/spool"; - if (!is_dir($spoolpath)) + if (!is_dir($spoolpath)) { mkdir($spoolpath); - elseif (!is_writable($spoolpath)) + } elseif (!is_writable($spoolpath)) { $spoolpath = $temppath; + } if (is_dir($spoolpath) AND is_writable($spoolpath)) { set_config("system", "spoolpath", $spoolpath);