From: Roland Haeder Date: Thu, 17 Apr 2014 21:38:15 +0000 (+0200) Subject: Function getSession() does now only use secureString() if no database X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f9fb6c70ac832c0fce74dc922079498d9e0fe8e8;p=mailer.git Function getSession() does now only use secureString() if no database connection is there. This saves some "expensive" calls to the EL-code functions. Signed-off-by: Roland Häder --- diff --git a/inc/session-functions.php b/inc/session-functions.php index 5421c1f013..954d233c3d 100644 --- a/inc/session-functions.php +++ b/inc/session-functions.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Sitzungsrelevante Funktionen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -100,7 +95,13 @@ function getSession ($var) { // Is the variable there? if (isSessionVariableSet($var)) { // Then get it secured! - $value = sqlEscapeString($GLOBALS['_SESSION'][$var]); + if ((isInstaller()) || (!isSqlLinkUp())) { + // Secure string without escaping (and compiling) + $value = secureString($GLOBALS['_SESSION'][$var]); + } else { + // Escape string with SQL driver + $value = sqlEscapeString($GLOBALS['_SESSION'][$var]); + } } // END - if // Return the value