Permalink
Browse files

Removal of _GET form actions

Removed form actions from _GET so that tep_validate_form can handle.
  • Loading branch information...
1 parent c36a074 commit 8ea70235be131503c2caa31ce2daff2251e1a956 FwrMedia committed Jul 27, 2012
@@ -14,7 +14,7 @@
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);
- if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send') && (false !== $validated = tep_validate_form(array('name' => 'strip_tags','email' => 'strip_tags','enquiry' => 'strip_tags')))) {
+ if (false !== $validated = tep_validate_form(array('action' => 'send', 'name' => 'strip_tags','email' => 'strip_tags','enquiry' => 'strip_tags'))) {
extract($validated,EXTR_OVERWRITE);
$error = false;
@@ -71,7 +71,7 @@
} else {
?>
-<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', '', true); ?>
+<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US), 'post', '', true); ?>
<div class="contentContainer">
<div class="contentText">
@@ -92,7 +92,7 @@
</div>
<div class="buttonSet">
- <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
+ <span class="buttonAction"><?php echo tep_draw_hidden_field('action', 'send') . tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
</div>
</div>
View
@@ -20,7 +20,7 @@
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);
$error = false;
- if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && (false !== $validated = tep_validate_form(array('email_address' => 'strip_tags','password' => 'strip_tags')))) {
+ if (false !== $validated = tep_validate_form(array('action' => 'process', 'email_address' => 'strip_tags','password' => 'strip_tags'))) {
extract($validated,EXTR_OVERWRITE);
// Check if email exists
@@ -109,7 +109,7 @@
<div class="contentText">
<p><?php echo TEXT_RETURNING_CUSTOMER; ?></p>
- <?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true); ?>
+ <?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, '', 'SSL'), 'post', '', true); ?>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
@@ -124,7 +124,7 @@
<p><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></p>
- <p align="right"><?php echo tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', null, 'primary'); ?></p>
+ <p align="right"><?php echo tep_draw_hidden_field('action', 'process') . tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', null, 'primary'); ?></p>
</form>
</div>
@@ -16,7 +16,7 @@
$password_reset_initiated = false;
- if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && (false !== $validated = tep_validate_form(array('email_address' => 'strip_tags')))) {
+ if (false !== $validated = tep_validate_form(array('action' => 'process', 'email_address' => 'strip_tags'))) {
extract($validated,EXTR_OVERWRITE);
$check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
@@ -77,7 +77,7 @@
} else {
?>
-<?php echo tep_draw_form('password_forgotten', tep_href_link(FILENAME_PASSWORD_FORGOTTEN, 'action=process', 'SSL'), 'post', '', true); ?>
+<?php echo tep_draw_form('password_forgotten', tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL'), 'post', '', true); ?>
<div class="contentContainer">
<div class="contentText">
@@ -94,7 +94,7 @@
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
- <?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?>
+ <?php echo tep_draw_hidden_field('action', 'process') . tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?>
</div>
</div>
@@ -55,7 +55,7 @@
if ($error == true) {
tep_redirect(tep_href_link(FILENAME_PASSWORD_FORGOTTEN));
}
- if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && (false !== $validated = tep_validate_form(array('password' => 'strip_tags','confirmation' => 'strip_tags')))) {
+ if (false !== $validated = tep_validate_form(array('action' => 'process', 'password' => 'strip_tags','confirmation' => 'strip_tags'))) {
extract($validated,EXTR_OVERWRITE);
if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
@@ -94,7 +94,7 @@
}
?>
-<?php echo tep_draw_form('password_reset', tep_href_link(FILENAME_PASSWORD_RESET, 'account=' . $email_address . '&key=' . $password_key . '&action=process', 'SSL'), 'post', 'onsubmit="return check_form(password_reset);"', true); ?>
+<?php echo tep_draw_form('password_reset', tep_href_link(FILENAME_PASSWORD_RESET, 'account=' . $email_address . '&key=' . $password_key, 'SSL'), 'post', 'onsubmit="return check_form(password_reset);"', true); ?>
<div class="contentContainer">
<div class="contentText">
@@ -113,7 +113,7 @@
</div>
<div class="buttonSet">
- <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
+ <span class="buttonAction"><?php echo tep_draw_hidden_field('action', 'process') . tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
</div>
</div>
@@ -29,7 +29,7 @@
$customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$customer = tep_db_fetch_array($customer_query);
- if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && (false !== $validated = tep_validate_form(array('rating' => 'int','review' => 'strip_tags')))) {
+ if (false !== $validated = tep_validate_form(array('action' => 'process', 'rating' => 'int','review' => 'strip_tags'))) {
extract($validated,EXTR_OVERWRITE);
$error = false;
@@ -111,7 +111,7 @@ function checkForm() {
}
?>
-<?php echo tep_draw_form('product_reviews_write', tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'action=process&products_id=' . $HTTP_GET_VARS['products_id']), 'post', 'onsubmit="return checkForm();"', true); ?>
+<?php echo tep_draw_form('product_reviews_write', tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']), 'post', 'onsubmit="return checkForm();"', true); ?>
<div class="contentContainer">
@@ -149,7 +149,7 @@ function checkForm() {
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
- <?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id', 'action')))); ?>
+ <?php echo tep_draw_hidden_field('action', 'process') . tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id', 'action')))); ?>
</div>
</div>
@@ -33,7 +33,7 @@
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_TELL_A_FRIEND);
- if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && (false !== $validated = tep_validate_form(array('to_email_address' => 'strip_tags','to_name' => 'strip_tags','from_email_address' => 'strip_tags','from_name' => 'strip_tags','message' => 'strip_tags')))) {
+ if (false !== $validated = tep_validate_form(array('action' => 'process', 'to_email_address' => 'strip_tags','to_name' => 'strip_tags','from_email_address' => 'strip_tags','from_name' => 'strip_tags','message' => 'strip_tags'))) {
extract($validated,EXTR_OVERWRITE);
$error = false;
@@ -110,7 +110,7 @@
}
?>
-<?php echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&products_id=' . (int)$HTTP_GET_VARS['products_id']), 'post', '', true); ?>
+<?php echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . (int)$HTTP_GET_VARS['products_id']), 'post', '', true); ?>
<div class="contentContainer">
<div>
@@ -159,7 +159,7 @@
<div class="buttonSet">
<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>
- <?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id'])); ?>
+ <?php echo tep_draw_hidden_field('action', 'process') . tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id'])); ?>
</div>
</div>

0 comments on commit 8ea7023

Please sign in to comment.