diff --git a/src/Jirafeau/s.php b/src/Jirafeau/s.php index a396961..17b918e 100644 --- a/src/Jirafeau/s.php +++ b/src/Jirafeau/s.php @@ -16,6 +16,40 @@ require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); +// ======================================== +function period2seconds ($periodName) { + if (!$periodName) + return JIRAFEAU_MONTH; + switch ($periodName) { + case 'minute': + return JIRAFEAU_MINUTE; + break; + case 'hour': + return JIRAFEAU_HOUR; + break; + case 'day': + return JIRAFEAU_DAY; + break; + case 'week': + return JIRAFEAU_WEEK; + break; + case 'month': + return JIRAFEAU_MONTH; + break; + case 'quarter': + return JIRAFEAU_QUARTER; + break; + case 'semester': + return JIRAFEAU_SEMESTER; + break; + case 'year': + return JIRAFEAU_YEAR; + break; + default: + returnError (t ('ERR_OCC') . ' (periodName)'); + } +} + // ======================================== function returnError ($msg) { require (JIRAFEAU_ROOT.'lib/template/header.php'); diff --git a/src/bash/filterTest.sh b/src/bash/filterTest.sh index 99cfc02..fc6d10b 100755 --- a/src/bash/filterTest.sh +++ b/src/bash/filterTest.sh @@ -91,7 +91,7 @@ eMailShrinker="$(realpath "./eMailShrinker")" ######################################## dos2unix "${mbox}" -[ -z "${SIMULATE}" ] && DOMAINEDEPOT="$(cat domainedepot)" +[ -z "${SIMULATE}" ] && DOMAINEDEPOT="$(cat config/domainedepot)" JIRAFEAU_URL="https://depot.${DOMAINEDEPOT}" JIRAFEAU_LOCAL="${JIRAFEAU_URL}"