Added encryption stuff + rewrote sendWernisApiRequest() to handle the decryption.
[mailer.git] / inc / wrapper-functions.php
index 9cc88986eb5139d470d09d8fa3e447a8d0f05b9f..ab921c4b4f0752a52a4cfc376ae54f528d27748e 100644 (file)
@@ -11,7 +11,7 @@
  * Kurzbeschreibung  : Wrapper-Funktionen                               *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -999,6 +999,9 @@ function setAdminMd5 ($adminMd5) {
        // Set session
        $status = setSession('admin_md5', $adminMd5);
 
+       // Remove cache to get correct results
+       unset($GLOBALS['isAdmin']);
+
        // Return status
        return $status;
 }
@@ -1256,6 +1259,8 @@ function getHttpStatus () {
  * @access  private
  */
 function sendRawRedirect ($url) {
+       //* DEBUG-DIE */ die(__METHOD__ . ':url=' . $url);
+
        // Clear output buffer
        clearOutputBuffer();
 
@@ -1273,6 +1278,7 @@ function sendRawRedirect ($url) {
 
        // Revert entity &
        $url = str_replace('&', '&', $url);
+       //* DEBUG-DIE */ die(__METHOD__ . ':url=' . $url);
 
        // check if running on IIS < 6 with CGI-PHP
        if ((isset($_SERVER['SERVER_SOFTWARE'])) && (isset($_SERVER['GATEWAY_INTERFACE'])) &&
@@ -3569,8 +3575,14 @@ function getGenericHashFileName () {
 
 // "Compiles" the given value and sets it in given key
 function setSessionCompiled ($key, $value) {
-       // "Compile" the value
-       $value = doFinalCompilation(compileRawCode($value));
+       // Debug message
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key[]=' . gettype($key) . ',value[]=' . gettype($value));
+
+       // Is the value not an array?
+       if (!is_array($value)) {
+               // "Compile" the value
+               $value = doFinalCompilation(compileRawCode($value));
+       } // END - if
 
        // And set it
        return setSession($key, $value);