Project

General

Profile

« Previous | Next » 

Revision 1590

Added by darkviper over 12 years ago

added request var to submit a request identifier. argument ?fri=12345 on GET-view will submit 'FormRequestId: 12345' by email

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12

  
13 13
=========================== add small Features 2.8.2 ==========================
14
25 Jan-2012 Build 1590 Werner v.d.Decken(DarkViper)
15
! mod form: added request var to submit a request identifier.
16
! argument ?fri=12345 on GET-view will submit 'FormRequestId: 12345' by email
14 17
25 Jan-2012 Build 1589 Dietmar Woellbrink (Luisehahne)
15 18
# fixed starting upgrade-script if missing revision in settings
16 19
25 Jan-2012 Build 1588 Werner v.d.Decken(DarkViper)
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.2');
54
if(!defined('REVISION')) define('REVISION', '1589');
54
if(!defined('REVISION')) define('REVISION', '1590');
55 55
if(!defined('SP')) define('SP', 'SP2');
branches/2.8.x/wb/modules/form/view.php
154 154
?>
155 155
			<form <?php echo ( ( (strlen($form_name) > 0) AND (false == $use_xhtml_strict) ) ? "name=\"".$form_name."\"" : ""); ?> action="<?php echo htmlspecialchars(strip_tags($_SERVER['SCRIPT_NAME'])).'';?>" method="post">
156 156
				<input type="hidden" name="submission_id" value="<?php echo $_SESSION['form_submission_id']; ?>" />
157
				<?php
158
				$iFormRequestId = isset($_GET['fri']) ? intval($_GET['fri']) : 0;
159
				if($iFormRequestId) {
160
					echo '<input type="hidden" name="fri" value="'.$iFormRequestId.'" />'."\n";
161
				}
162
				?>
157 163
				<?php // echo $admin->getFTAN(); ?>
158 164
				<?php
159 165
				if(ENABLED_ASP) { // first add some honeypot-fields
......
423 429
					} else {
424 430
						// Adding the IP to the body and try to send the email
425 431
						// $email_body .= "\n\nIP: ".$_SERVER['REMOTE_ADDR'];
426

  
432
						$iFormRequestId = isset($_POST[fri]) ? intval($_POST['fri']) : 0;
433
						if($iFormRequestId) {
434
							$email_body .= "\n\nFormRequestID: ".$iFormRequestId;
435
						}
427 436
						$recipient = preg_replace( "/[^a-z0-9 !?:;,.\/_\-=+@#$&\*\(\)]/im", "", $email_fromname );
428 437
						$email_fromname = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $recipient );
429 438
						$email_body = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $email_body );
......
522 531
		}
523 532
	}
524 533

  
525
}
534
}

Also available in: Unified diff