X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/5545d874624b35a364e26e140a9538450ed6709f..5d175ba7ddf47940b6373f419b41ed24c3eb4954:/lib/functions.js.php diff --git a/lib/functions.js.php b/lib/functions.js.php index e981e35..dab491c 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -17,17 +17,19 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + header('Content-Type: text/javascript'); -define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/../'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); -require (JIRAFEAU_ROOT . 'lib/settings.php'); -require (JIRAFEAU_ROOT . 'lib/functions.php'); -require (JIRAFEAU_ROOT . 'lib/lang.php'); + +define('JIRAFEAU_ROOT', dirname(__FILE__) . '/../'); + +require(JIRAFEAU_ROOT . 'lib/settings.php'); +require(JIRAFEAU_ROOT . 'lib/functions.php'); +require(JIRAFEAU_ROOT . 'lib/lang.php'); ?> function translate (expr) { - var lang_array = ; + var lang_array = ; if (lang_array.hasOwnProperty(expr)) return lang_array[expr]; return expr; @@ -204,7 +206,7 @@ function add_time_string_to_date(d, time) { return false; } - + if (time == 'minute') { d.setSeconds (d.getSeconds() + 60); @@ -230,6 +232,11 @@ function add_time_string_to_date(d, time) d.setSeconds (d.getSeconds() + 2419200); return true; } + if (time == 'quarter') + { + d.setSeconds (d.getSeconds() + 7257600); + return true; + } if (time == 'year') { d.setSeconds (d.getSeconds() + 29030400);