X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fexpression-functions.php;h=afb7a7bf530da5f7a79bf42014c356ea5c30ed98;hb=55ffbd0926d1a420226e02b0c171f0cc1ce67169;hp=de71466a0277cb8215a2515207ec1c9af63d1c3f;hpb=175b3f506e193d8d791ec6523db42276e296dd0b;p=mailer.git diff --git a/inc/expression-functions.php b/inc/expression-functions.php index de71466a02..afb7a7bf53 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -10,13 +10,8 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Expression-Callback-Funktionen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -157,7 +152,7 @@ function doExpressionExt ($data) { } // END - if // Generate replacer - $replacer = sprintf("&ext=%s&ver=%s&rev={?CURRENT_REPOSITORY_REVISION?}", $data['matches'][4][$data['key']], $replacer); + $replacer = sprintf('&ext=%s&ver=%s', $data['matches'][4][$data['key']], $replacer); // Replace it and insert parameter for GET request $code = replaceExpressionCode($data, $replacer); @@ -327,9 +322,6 @@ function doExpressionMath ($data) { // Replace the code $code = replaceExpressionCode($data, $replacer); - // Load include once - loadIncludeOnce('inc/math-functions.php'); - // Return the (maybe) replaced code return $code; } @@ -523,8 +515,8 @@ function doExpressionFormClose ($data) { // Expression call-back to handle jquery inclusion function doExpressionJquery ($data) { - // Default is compressed - $jquery = 'jquery'; + // Default is uncompressed + $scriptName = 'jquery'; $data['output_mode'] = ''; // Is there JS-mode? @@ -536,20 +528,20 @@ function doExpressionJquery ($data) { // Is there a value? if ($data['callback'] == 'js') { // Then load special library - $jquery .= '-' . $data['value']; + $scriptName .= '-' . $data['value']; } // END - if - // Is debug mode enabled? - if ((isGetRequestElementSet('jquery')) || (isSessionVariableSet('jquery'))) { - // Then use uncompressed - $jquery .= '.uncompressed'; - - // Remember it in session + // Is debug-mode enabled and parameter/session key 'jquery' given? + if ((!isDebugModeEnabled()) || ((!isGetRequestElementSet('jquery')) && (!isSessionVariableSet('jquery')))) { + // Productive systems want minimized version + $scriptName .= '.min'; + } else { + // Debug version is uncompressed, remember it in session setSession('jquery', '1'); - } // END - if + } // Add {%url%} around it - $replacer = '{%url' . $data['output_mode'] . '=js/' . $jquery . '.js?dummy=1%}'; + $replacer = sprintf('{%%url%s=js/jquery/%s.js?dummy=1%%}', $data['output_mode'], $scriptName); // Replace the code $code = replaceExpressionCode($data, $replacer); @@ -558,5 +550,7 @@ function doExpressionJquery ($data) { return $code; } -// [EOF] -?> +// Expression call-back to handle JavaScript inclusion +function doExpressionJs ($data) { + die('
'.print_r($data, TRUE));
+}