Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed some uneeded linees
  • Loading branch information
danielkerr committed Jul 27, 2015
1 parent 2712f41 commit 31e57ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions upload/admin/view/template/sale/order_form.tpl
Expand Up @@ -1012,7 +1012,6 @@ $('select[name=\'currency\']').on('change', function() {
$('#button-refresh').on('click', function() {
$.ajax({
url: $('select[name=\'store\'] option:selected').val() + 'index.php?route=api/cart/products&token=' + token,
type: 'post',
dataType: 'json',
crossDomain: true,
success: function(json) {
Expand Down Expand Up @@ -1867,7 +1866,6 @@ $('#button-payment-address').on('click', function() {
// Payment Methods
$.ajax({
url: $('select[name=\'store\'] option:selected').val() + 'index.php?route=api/payment/methods&token=' + token,
type: 'post',
dataType: 'json',
crossDomain: true,
beforeSend: function() {
Expand Down Expand Up @@ -2054,7 +2052,6 @@ $('#button-shipping-address').on('click', function() {
// Shipping Methods
$.ajax({
url: $('select[name=\'store\'] option:selected').val() + 'index.php?route=api/shipping/methods&token=' + token,
type: 'post',
dataType: 'json',
beforeSend: function() {
$('#button-shipping-address i').replaceWith('<i class="fa fa-circle-o-notch fa-spin"></i>');
Expand Down Expand Up @@ -2116,7 +2113,7 @@ $('#button-shipping-method').on('click', function() {
$.ajax({
url: $('select[name=\'store\'] option:selected').val() + 'index.php?route=api/shipping/method&token=' + token,
type: 'post',
data: 'token=<?php echo $token; ?>&shipping_method=' + $('select[name=\'shipping_method\'] option:selected').val(),
data: 'shipping_method=' + $('select[name=\'shipping_method\'] option:selected').val(),
dataType: 'json',
crossDomain: true,
beforeSend: function() {
Expand Down Expand Up @@ -2192,7 +2189,7 @@ $('#button-coupon').on('click', function() {
$.ajax({
url: $('select[name=\'store\'] option:selected').val() + 'index.php?route=api/coupon&token=' + token,
type: 'post',
data: 'token=<?php echo $token; ?>&coupon=' + $('input[name=\'coupon\']').val(),
data: 'coupon=' + $('input[name=\'coupon\']').val(),
dataType: 'json',
crossDomain: true,
beforeSend: function() {
Expand Down
2 changes: 1 addition & 1 deletion upload/index.php
Expand Up @@ -126,7 +126,7 @@ function error_handler($code, $message, $file, $line) {
if (isset($request->get['token']) && isset($request->get['route']) && substr($request->get['route'], 0, 4) == 'api/') {
$db->query("DELETE FROM `" . DB_PREFIX . "api_session` WHERE TIMESTAMPADD(HOUR, 1, date_modified) < NOW()");

$query = $db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "api_session` `as` LEFT JOIN " . DB_PREFIX . "api_ip `ai` ON (as.api_id = ai.api_id) WHERE as.token = '" . $db->escape($request->get['token']) . "' AND ai.ip = '" . $db->escape($request->server['REMOTE_ADDR']) . "'");
$query = $db->query("SELECT DISTINCT * FROM `" . DB_PREFIX . "api_session` `as` LEFT JOIN " . DB_PREFIX . "api_ip `ai` ON (as.api_id = ai.api_id) WHERE as.token = '" . $db->escape($request->get['token']) . "' AND ai.ip = '" . $db->escape($request->server['REMOTE_ADDR']) . "'");

if ($query->num_rows) {
// Does not seem PHP is able to handle sessions as objects properly so so wrote my own class
Expand Down

0 comments on commit 31e57ab

Please sign in to comment.