Changes in oscommerce2/trunk/catalog [477:723]
- Files:
-
- oscommerce2/trunk/catalog/shopping_cart.php (modified) (1 diff)
- oscommerce2/trunk/catalog/includes/classes/shopping_cart.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/includes/classes/sessions.php (modified) (1 diff)
- oscommerce2/trunk/catalog/includes/languages/espanol/modules/shipping/ups.php (deleted)
- oscommerce2/trunk/catalog/includes/languages/english/modules/shipping/ups.php (deleted)
- oscommerce2/trunk/catalog/includes/languages/german/modules/shipping/ups.php (deleted)
- oscommerce2/trunk/catalog/includes/functions/compatibility.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/includes/functions/general.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/includes/functions/cache.php (modified) (4 diffs)
- oscommerce2/trunk/catalog/includes/functions/html_output.php (modified) (1 diff)
- oscommerce2/trunk/catalog/tell_a_friend.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/admin/includes/languages/espanol/index.php (modified) (1 diff)
- oscommerce2/trunk/catalog/admin/includes/languages/english/index.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/admin/includes/languages/german/index.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/admin/includes/functions/compatibility.php (modified) (2 diffs)
- oscommerce2/trunk/catalog/admin/includes/functions/general.php (modified) (1 diff)
- oscommerce2/trunk/catalog/admin/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
oscommerce2/trunk/catalog/shopping_cart.php
r477 r703 82 82 $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix 83 83 from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa 84 where pa.products_id = '" . $products[$i]['id'] . "'85 and pa.options_id = '" . $option . "'84 where pa.products_id = '" . (int)$products[$i]['id'] . "' 85 and pa.options_id = '" . (int)$option . "' 86 86 and pa.options_id = popt.products_options_id 87 and pa.options_values_id = '" . $value . "'87 and pa.options_values_id = '" . (int)$value . "' 88 88 and pa.options_values_id = poval.products_options_values_id 89 and popt.language_id = '" . $languages_id . "'90 and poval.language_id = '" . $languages_id . "'");89 and popt.language_id = '" . (int)$languages_id . "' 90 and poval.language_id = '" . (int)$languages_id . "'"); 91 91 $attributes_values = tep_db_fetch_array($attributes); 92 92 oscommerce2/trunk/catalog/includes/classes/shopping_cart.php
r477 r703 82 82 $products_id = tep_get_prid($products_id_string); 83 83 84 if (is_numeric($products_id) && is_numeric($qty)) { 84 $attributes_pass_check = true; 85 86 if (is_array($attributes)) { 87 reset($attributes); 88 while (list($option, $value) = each($attributes)) { 89 if (!is_numeric($option) || !is_numeric($value)) { 90 $attributes_pass_check = false; 91 break; 92 } 93 } 94 } 95 96 if (is_numeric($products_id) && is_numeric($qty) && ($attributes_pass_check == true)) { 85 97 $check_product_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); 86 98 $check_product = tep_db_fetch_array($check_product_query); … … 123 135 $products_id = tep_get_prid($products_id_string); 124 136 125 if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity)) { 137 $attributes_pass_check = true; 138 139 if (is_array($attributes)) { 140 reset($attributes); 141 while (list($option, $value) = each($attributes)) { 142 if (!is_numeric($option) || !is_numeric($value)) { 143 $attributes_pass_check = false; 144 break; 145 } 146 } 147 } 148 149 if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) { 126 150 $this->contents[$products_id_string] = array('qty' => $quantity); 127 151 // update database oscommerce2/trunk/catalog/includes/classes/sessions.php
r477 r709 378 378 } 379 379 380 if (!empty($session->id)) { 381 if (preg_match('/^[a-zA-Z0-9]+$/', $session->id) == false) { 382 unset($session->id); 383 } 384 } 385 380 386 /* 381 387 // Check the REQUEST_URI symbol for a string of the form oscommerce2/trunk/catalog/includes/functions/compatibility.php
r477 r706 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 3osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 23 23 24 24 while (list($key, $value) = each($ar)) { 25 if (is_array($ value)) {26 do_magic_quotes_gpc($ value);25 if (is_array($ar[$key])) { 26 do_magic_quotes_gpc($ar[$key]); 27 27 } else { 28 28 $ar[$key] = addslashes($value); oscommerce2/trunk/catalog/includes/functions/general.php
r477 r713 451 451 } 452 452 } elseif (isset($address['country']) && tep_not_null($address['country'])) { 453 $country = tep_output_string_protected($address['country'] );453 $country = tep_output_string_protected($address['country']['title']); 454 454 } else { 455 455 $country = ''; … … 481 481 $streets = $street; 482 482 if ($suburb != '') $streets = $street . $cr . $suburb; 483 if ($country == '') $country = tep_output_string_protected($address['country']);484 483 if ($state != '') $statecomma = $state . ', '; 485 484 oscommerce2/trunk/catalog/includes/functions/cache.php
r477 r708 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 3osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 101 101 global $cPath, $language, $languages_id, $tree, $cPath_array, $categories_string; 102 102 103 $cache_output = ''; 104 103 105 if (($refresh == true) || !read_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath, $auto_expire)) { 104 106 ob_start(); … … 118 120 global $HTTP_GET_VARS, $language; 119 121 122 $cache_output = ''; 123 120 124 $manufacturers_id = ''; 121 if (isset($HTTP_GET_VARS['manufactuers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {125 if (isset($HTTP_GET_VARS['manufactuers_id']) && is_numeric($HTTP_GET_VARS['manufacturers_id'])) { 122 126 $manufacturers_id = $HTTP_GET_VARS['manufacturers_id']; 123 127 } … … 140 144 global $HTTP_GET_VARS, $language, $languages_id; 141 145 142 if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) { 143 ob_start(); 144 include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); 145 $cache_output = ob_get_contents(); 146 ob_end_clean(); 147 write_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id']); 146 $cache_output = ''; 147 148 if (isset($HTTP_GET_VARS['products_id']) && is_numeric($HTTP_GET_VARS['products_id'])) { 149 if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) { 150 ob_start(); 151 include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); 152 $cache_output = ob_get_contents(); 153 ob_end_clean(); 154 write_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id']); 155 } 148 156 } 149 157 oscommerce2/trunk/catalog/includes/functions/html_output.php
r477 r707 89 89 if (empty($width) && tep_not_null($height)) { 90 90 $ratio = $height / $image_size[1]; 91 $width = $image_size[0] * $ratio;91 $width = intval($image_size[0] * $ratio); 92 92 } elseif (tep_not_null($width) && empty($height)) { 93 93 $ratio = $width / $image_size[0]; 94 $height = $image_size[1] * $ratio;94 $height = intval($image_size[1] * $ratio); 95 95 } elseif (empty($width) && empty($height)) { 96 96 $width = $image_size[0]; oscommerce2/trunk/catalog/tell_a_friend.php
r477 r715 1 1 <?php 2 2 /* 3 $Id: tell_a_friend.php,v 1.42 2003/06/11 17:35:01 hpdl Exp$3 $Id: $ 4 4 5 5 osCommerce, Open Source E-Commerce Solutions 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 3osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 75 75 } 76 76 77 $email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'] )) . "\n\n" .77 $email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false)) . "\n\n" . 78 78 sprintf(TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); 79 79 oscommerce2/trunk/catalog/admin/includes/languages/espanol/index.php
r477 r710 18 18 define('BOX_ENTRY_SUPPORT_SITE', 'Soporte'); 19 19 define('BOX_ENTRY_SUPPORT_FORUMS', 'Foros'); 20 define('BOX_ENTRY_MAILING_LISTS', 'Listas de Correo'); 21 define('BOX_ENTRY_BUG_REPORTS', 'Notificar Fallos'); 22 define('BOX_ENTRY_FAQ', 'PUF (FAQ)'); 23 define('BOX_ENTRY_LIVE_DISCUSSIONS', 'Discusiones'); 24 define('BOX_ENTRY_CVS_REPOSITORY', 'Repositorio CVS'); 25 define('BOX_ENTRY_INFORMATION_PORTAL', 'Portal'); 20 define('BOX_ENTRY_CONTRIBUTIONS', 'Módulos'); 26 21 27 22 define('BOX_ENTRY_CUSTOMERS', 'Clientes:'); oscommerce2/trunk/catalog/admin/includes/languages/english/index.php
r477 r710 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 2osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 18 18 define('BOX_ENTRY_SUPPORT_SITE', 'Support Site'); 19 19 define('BOX_ENTRY_SUPPORT_FORUMS', 'Support Forums'); 20 define('BOX_ENTRY_MAILING_LISTS', 'Mailing Lists'); 21 define('BOX_ENTRY_BUG_REPORTS', 'Bug Reports'); 22 define('BOX_ENTRY_FAQ', 'FAQ'); 23 define('BOX_ENTRY_LIVE_DISCUSSIONS', 'Live Discussions'); 24 define('BOX_ENTRY_CVS_REPOSITORY', 'CVS Repository'); 25 define('BOX_ENTRY_INFORMATION_PORTAL', 'Information Portal'); 20 define('BOX_ENTRY_CONTRIBUTIONS', 'Contributions'); 26 21 27 22 define('BOX_ENTRY_CUSTOMERS', 'Customers:'); oscommerce2/trunk/catalog/admin/includes/languages/german/index.php
r477 r710 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 2osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 18 18 define('BOX_ENTRY_SUPPORT_SITE', 'Support Seite'); 19 19 define('BOX_ENTRY_SUPPORT_FORUMS', 'Support Forum'); 20 define('BOX_ENTRY_MAILING_LISTS', 'Mailing Listen'); 21 define('BOX_ENTRY_BUG_REPORTS', 'Fehler Reporte'); 22 define('BOX_ENTRY_FAQ', 'Fragen und Antworten'); 23 define('BOX_ENTRY_LIVE_DISCUSSIONS', 'Live Diskussionen'); 24 define('BOX_ENTRY_CVS_REPOSITORY', 'CVS Repository'); 25 define('BOX_ENTRY_INFORMATION_PORTAL', 'Informations Portal'); 20 define('BOX_ENTRY_CONTRIBUTIONS', 'Add-On Module'); 26 21 27 22 define('BOX_ENTRY_CUSTOMERS', 'Kunden:'); oscommerce2/trunk/catalog/admin/includes/functions/compatibility.php
r477 r706 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 3osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 20 20 21 21 while (list($key, $value) = each($ar)) { 22 if (is_array($ value)) {23 do_magic_quotes_gpc($ value);22 if (is_array($ar[$key])) { 23 do_magic_quotes_gpc($ar[$key]); 24 24 } else { 25 25 $ar[$key] = addslashes($value); oscommerce2/trunk/catalog/admin/includes/functions/general.php
r477 r723 898 898 tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "'"); 899 899 tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'"); 900 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int)$product_id . "' ");901 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "' ");900 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int)$product_id . "' or products_id like '" . (int)$product_id . "{%'"); 901 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "' or products_id like '" . (int)$product_id . "{%'"); 902 902 903 903 $product_reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where products_id = '" . (int)$product_id . "'"); oscommerce2/trunk/catalog/admin/index.php
r477 r710 6 6 http://www.oscommerce.com 7 7 8 Copyright (c) 200 3osCommerce8 Copyright (c) 2006 osCommerce 9 9 10 10 Released under the GNU General Public License … … 116 116 $contents[] = array('params' => 'class="infoBox"', 117 117 'text' => '<a href="http://www.oscommerce.com" target="_blank">' . BOX_ENTRY_SUPPORT_SITE . '</a><br>' . 118 '<a href="http://www.oscommerce.com/community.php/forum" target="_blank">' . BOX_ENTRY_SUPPORT_FORUMS . '</a><br>' . 119 '<a href="http://www.oscommerce.com/community.php/mlists" target="_blank">' . BOX_ENTRY_MAILING_LISTS . '</a><br>' . 120 '<a href="http://www.oscommerce.com/community.php/bugs" target="_blank">' . BOX_ENTRY_BUG_REPORTS . '</a><br>' . 121 '<a href="http://www.oscommerce.com/community.php/faq" target="_blank">' . BOX_ENTRY_FAQ . '</a><br>' . 122 '<a href="http://www.oscommerce.com/community.php/irc" target="_blank">' . BOX_ENTRY_LIVE_DISCUSSIONS . '</a><br>' . 123 '<a href="http://www.oscommerce.com/community.php/cvs" target="_blank">' . BOX_ENTRY_CVS_REPOSITORY . '</a><br>' . 124 '<a href="http://www.oscommerce.com/about.php/portal" target="_blank">' . BOX_ENTRY_INFORMATION_PORTAL . '</a>'); 118 '<a href="http://forums.oscommerce.com" target="_blank">' . BOX_ENTRY_SUPPORT_FORUMS . '</a><br>' . 119 '<a href="http://www.oscommerce.com/community/contributions" target="_blank">' . BOX_ENTRY_CONTRIBUTIONS . '</a>'); 125 120 126 121 $box = new box;
