Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed superglobal values to global declaration as they not need it.

  • Loading branch information...
commit dbef0c5baf26be890178a3f0d14f2d4c12b45121 1 parent 666c164
unknown authored
2  catalog/includes/classes/order.php
@@ -131,7 +131,7 @@ function query($order_id) {
131 131 }
132 132
133 133 function cart() {
134   - global $HTTP_POST_VARS, $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $comments, $customer_default_address_id;
  134 + global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $comments, $customer_default_address_id;
135 135
136 136 $this->content_type = $cart->get_content_type();
137 137
6 catalog/includes/classes/shipping.php
@@ -15,15 +15,15 @@ class shipping {
15 15
16 16 // class constructor
17 17 function shipping($module = '') {
18   - global $language, $PHP_SELF;
  18 + global $language;
19 19
20 20 if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
21 21 $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
22 22
23 23 $include_modules = array();
24 24
25   - if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {
26   - $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));
  25 + if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)), $this->modules)) ) {
  26 + $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)));
27 27 } else {
28 28 reset($this->modules);
29 29 while (list(, $value) = each($this->modules)) {
15 catalog/includes/classes/split_page_results.php
@@ -15,8 +15,7 @@ class splitPageResults {
15 15
16 16 /* class constructor */
17 17 function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') {
18   - global $_GET, $_POST;
19   -
  18 +
20 19 $this->sql_query = $query;
21 20 $this->page_name = $page_holder;
22 21
@@ -71,7 +70,7 @@ function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'p
71 70
72 71 // display split-page-number-links
73 72 function display_links($max_page_links, $parameters = '') {
74   - global $PHP_SELF, $request_type;
  73 + global $request_type;
75 74
76 75 $display_links_string = '';
77 76
@@ -80,7 +79,7 @@ function display_links($max_page_links, $parameters = '') {
80 79 if (tep_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';
81 80
82 81 // previous button - not displayed on first page
83   - if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a>&nbsp;&nbsp;';
  82 + if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a>&nbsp;&nbsp;';
84 83
85 84 // check if number_of_pages > $max_page_links
86 85 $cur_window_num = (int)($this->current_page_number / $max_page_links);
@@ -90,22 +89,22 @@ function display_links($max_page_links, $parameters = '') {
90 89 if ($this->number_of_pages % $max_page_links) $max_window_num++;
91 90
92 91 // previous window of pages
93   - if ($cur_window_num > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>';
  92 + if ($cur_window_num > 1) $display_links_string .= '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>';
94 93
95 94 // page nn button
96 95 for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) {
97 96 if ($jump_to_page == $this->current_page_number) {
98 97 $display_links_string .= '&nbsp;<strong>' . $jump_to_page . '</strong>&nbsp;';
99 98 } else {
100   - $display_links_string .= '&nbsp;<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a>&nbsp;';
  99 + $display_links_string .= '&nbsp;<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a>&nbsp;';
101 100 }
102 101 }
103 102
104 103 // next window of pages
105   - if ($cur_window_num < $max_window_num) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>&nbsp;';
  104 + if ($cur_window_num < $max_window_num) $display_links_string .= '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>&nbsp;';
106 105
107 106 // next button
108   - if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= '&nbsp;<a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a>&nbsp;';
  107 + if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= '&nbsp;<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a>&nbsp;';
109 108
110 109 return $display_links_string;
111 110 }

0 comments on commit dbef0c5

Please sign in to comment.
Something went wrong with that request. Please try again.