Mailer project continued (heavy refactoring):
[mailer.git] / inc / filters.php
index 83019226a20f89bd1b43270e53398637cfb2e0a8..4852a2c12d1e68e3caeed594f767019a07c352cf 100644 (file)
@@ -557,7 +557,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) {
                                $filterData = call_user_func($etiFunction, $data);
                        } else {
                                // Unsupported command detected
-                               logDebugMessage(__FUNCTION__, __LINE__, 'eti=' . $eti . ', callback=' . $callback . ', extra=' . $extraFunction . ' - unsupported');
+                               logDebugMessage(__FUNCTION__, __LINE__, 'eti=' . $eti . ',etiFunction=' . $etiFunction . ',callback=' . $callback . ',extraFunction=' . $extraFunction . ',extraFunction2=' . $extraFunction2 . ' - UNSUPPORTED');
                        }
                } // END - foreach
        } // END - if
@@ -1340,5 +1340,17 @@ function FILTER_REDIRECT_WRONG_SERVER_NAME ($filterData) {
        return $filterData;
 }
 
+// Filter for adding hidden session id
+function FILTER_ADD_INPUT_HIDDEN_SESSION_ID ($filterData) {
+       // Is a spider detected?
+       if ((!isSpider()) && (!isSessionValid())) {
+               // No, then add the hidden field
+               $filterData['__replacer'] .= '<input type="hidden" name="' . session_name() . '" value="' . session_id() . '" />';
+       } // END - if
+
+       // Return filter data
+       return $filterData;
+}
+
 // [EOF]
 ?>