Project

General

Profile

« Previous | Next » 

Revision 936

Added by aldus almost 16 years ago

remove test_trash and unused variables in query (name and use_xhtml_strict) and add Stefanos suggetions for #588 in the action-string.

View differences:

view.php
118 118
$_SESSION['form_submission_id'] = new_submission_id();
119 119

  
120 120
// Get settings
121
$query_settings = $database->query("SELECT header,field_loop,footer,use_captcha,name,use_xhtml_strict FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
121
$query_settings = $database->query("SELECT header,field_loop,footer,use_captcha FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
122 122
if($query_settings->numRows() > 0) {
123 123
	$fetch_settings = $query_settings->fetchRow();
124 124
	$header = str_replace('{WB_URL}',WB_URL,$fetch_settings['header']);
125 125
	$field_loop = $fetch_settings['field_loop'];
126 126
	$footer = str_replace('{WB_URL}',WB_URL,$fetch_settings['footer']);
127 127
	$use_captcha = $fetch_settings['use_captcha'];
128
	$form_name = $fetch_settings['name'];
129
	$use_xhtml_strict = ($fetch_settings['use_xhtml_strict'] == 1);
128
	$form_name = 'form';
129
	$use_xhtml_strict = false;
130 130
} else {
131 131
	$header = '';
132 132
	$field_loop = '';
......
136 136
}
137 137

  
138 138
?>
139
<form <?php echo ( ( (strlen($form_name) > 0) AND (false == $use_xhtml_strict) ) ? "name=\"".$form_name."\"" : ""); ?> action="<?php echo htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])); ?>" method="post">
139
<form <?php echo ( ( (strlen($form_name) > 0) AND (false == $use_xhtml_strict) ) ? "name=\"".$form_name."\"" : ""); ?> action="<?php echo htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])); ?>#wb_section_<?PHP echo $section_id;?>" method="post">
140 140
<div><input type="hidden" name="submission_id" value="<?php echo $_SESSION['form_submission_id']; ?>" /></div>
141 141
<?php
142 142
if(ENABLED_ASP) { // first add some honeypot-fields

Also available in: Unified diff