From bb354a863da5b78a5e3037e5a231eaf70c6f3b2b Mon Sep 17 00:00:00 2001 From: Gergely Date: Sun, 5 Feb 2012 07:15:57 +0100 Subject: [PATCH 01/82] Revert "Revert "Use the local spinner.gif rather than rely on an external site. Fixes issue #168"" This reverts commit 5bb18ec5770b1d9e782acb70fa869e5c1c0e6dfd. --- catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js b/catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js index fa8f2275d..59a3dce03 100644 --- a/catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js +++ b/catalog/ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js @@ -8,7 +8,7 @@ Released under the GPL license: http://www.gnu.org/licenses/gpl.html */ -(function($){$.fn.extend({bxGallery:function(options){var defaults={maxwidth:'',maxheight:'',thumbwidth:200,thumbcrop:false,croppercent:.35,thumbplacement:'bottom',thumbcontainer:'',opacity:.7,load_text:'',load_image:'http://i302.photobucket.com/albums/nn92/wandoledzep/spinner.gif',wrapperclass:'outer'} +(function($){$.fn.extend({bxGallery:function(options){var defaults={maxwidth:'',maxheight:'',thumbwidth:200,thumbcrop:false,croppercent:.35,thumbplacement:'bottom',thumbcontainer:'',opacity:.7,load_text:'',load_image:'spinner.gif',wrapperclass:'outer'} var options=$.extend(defaults,options);var o=options;var cont='';var caption='';var $outer='';var $orig=this;var tall=0;var wide=0;var showing=0;var i=0;var k=$orig.find('img').size();var current;preload_img();function preload_img(){$orig.hide();if(o.load_text!=''){$orig.before('
'+o.load_text+'
');}else{$orig.before('
');} $orig.parent().find('#loading').css({'textAlign':'center','width':o.maxwidth});$orig.find('img').each(function(){var the_source=$(this).attr('src');var the_img=new Image();the_img.onload=function(){preload_check();};the_img.src=the_source;});} function preload_check(){i++;if(i==k){init();}} From 5ce0327fb243f00c64dd9db373c48c06f2be7f5d Mon Sep 17 00:00:00 2001 From: Gergely Date: Sun, 5 Feb 2012 07:31:00 +0100 Subject: [PATCH 02/82] Issues #378, #360 Can't edit language files in windows system Signed-off-by: Gergely --- catalog/admin/define_language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/admin/define_language.php b/catalog/admin/define_language.php index 3a4dc9e8d..369eebd86 100644 --- a/catalog/admin/define_language.php +++ b/catalog/admin/define_language.php @@ -59,7 +59,7 @@ function tep_opendir($path) { if (isset($HTTP_GET_VARS['filename'])) { $file_edit = realpath(DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']); - if (substr($file_edit, 0, strlen(DIR_FS_CATALOG_LANGUAGES)) != DIR_FS_CATALOG_LANGUAGES) { + if (str_replace('\\','/',substr($file_edit, 0, strlen(DIR_FS_CATALOG_LANGUAGES))) != DIR_FS_CATALOG_LANGUAGES) { tep_redirect(tep_href_link(FILENAME_DEFINE_LANGUAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir'])); } } From 50e829eeef3b84f060aa1d29c0eea3e3d0c3fee3 Mon Sep 17 00:00:00 2001 From: Gergely Date: Sun, 5 Feb 2012 08:09:01 +0100 Subject: [PATCH 03/82] Issue #405 Close all accordions when step into admin or click oscommerce logo Signed-off-by: Gergely --- catalog/admin/includes/column_left.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/catalog/admin/includes/column_left.php b/catalog/admin/includes/column_left.php index 17a2f840a..d70bfb683 100644 --- a/catalog/admin/includes/column_left.php +++ b/catalog/admin/includes/column_left.php @@ -53,13 +53,19 @@ foreach ($cl_box_groups as $groups) { foreach ($groups['apps'] as $app) { if ($app['code'] == $PHP_SELF) { - echo ',active: ' . $counter; + $active_value = $counter; break; } } $counter++; } + + if (isset($active_value)) { + echo ',active: ' . $active_value; + } else { + echo ',active: ' . $counter; + } ?> }); From 56cc2133764009a1bc3621f7f9c31df2b4ef6cd3 Mon Sep 17 00:00:00 2001 From: Gergely Date: Sun, 5 Feb 2012 08:39:18 +0100 Subject: [PATCH 04/82] Issue #370 Modules sort order bugfix Signed-off-by: Gergely --- catalog/admin/modules.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/catalog/admin/modules.php b/catalog/admin/modules.php index 925d442c6..b3fcb24fd 100644 --- a/catalog/admin/modules.php +++ b/catalog/admin/modules.php @@ -123,6 +123,7 @@ check() > 0) { - if (($module->sort_order > 0) && !isset($installed_modules[$module->sort_order])) { - $installed_modules[$module->sort_order] = $file; + if (($module->sort_order > 0) && !isset($pre_installed_modules[$module->sort_order])) { + $pre_installed_modules[$file] = $module->sort_order; } else { - $installed_modules[] = $file; + $pre_installed_modules[$file] = 0; } } @@ -186,7 +187,10 @@ } if (!isset($HTTP_GET_VARS['list'])) { - ksort($installed_modules); + asort($pre_installed_modules); + foreach ($pre_installed_modules as $key => $value) { + $installed_modules[] = $key; + } $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_key . "'"); if (tep_db_num_rows($check_query)) { $check = tep_db_fetch_array($check_query); From c173b5d37c22b140eedfc47ca53e6fb66f507288 Mon Sep 17 00:00:00 2001 From: Gergely Date: Thu, 9 Feb 2012 18:05:38 +0100 Subject: [PATCH 05/82] The $wrap parameter is no longer used in the core xhtml template issue 96 Signed-off-by: Gergely --- catalog/admin/banner_manager.php | 2 +- catalog/admin/categories.php | 4 ++-- catalog/admin/define_language.php | 2 +- catalog/admin/includes/functions/general.php | 2 +- catalog/admin/includes/functions/html_output.php | 3 +-- catalog/admin/mail.php | 2 +- catalog/admin/newsletters.php | 2 +- catalog/admin/orders.php | 2 +- catalog/admin/reviews.php | 2 +- catalog/admin/server_info.php | 2 +- catalog/checkout_payment.php | 2 +- catalog/checkout_shipping.php | 2 +- catalog/contact_us.php | 2 +- catalog/includes/functions/html_output.php | 3 +-- catalog/includes/modules/payment/paypal_express.php | 2 +- catalog/includes/modules/payment/paypal_pro_payflow_ec.php | 2 +- catalog/includes/modules/payment/sage_pay_form.php | 2 +- catalog/product_reviews_write.php | 2 +- catalog/tell_a_friend.php | 2 +- 19 files changed, 20 insertions(+), 22 deletions(-) diff --git a/catalog/admin/banner_manager.php b/catalog/admin/banner_manager.php index eb6a0210b..9e616dadc 100644 --- a/catalog/admin/banner_manager.php +++ b/catalog/admin/banner_manager.php @@ -268,7 +268,7 @@ function popupImageWindow(url) { - banners_html_text); ?> + banners_html_text); ?> diff --git a/catalog/admin/categories.php b/catalog/admin/categories.php index 4c26a1553..04f471157 100644 --- a/catalog/admin/categories.php +++ b/catalog/admin/categories.php @@ -565,7 +565,7 @@ function updateNet() { - +
 products_id) ? '' : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>products_id) ? '' : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>
@@ -601,7 +601,7 @@ function updateNet() { foreach ($pInfo->products_larger_images as $pi) { $pi_counter++; - echo '
  • ' . TEXT_PRODUCTS_LARGE_IMAGE . '
    ' . tep_draw_file_field('products_image_large_' . $pi['id']) . '
    ' . $pi['image'] . '

    ' . TEXT_PRODUCTS_LARGE_IMAGE_HTML_CONTENT . '
    ' . tep_draw_textarea_field('products_image_htmlcontent_' . $pi['id'], 'soft', '70', '3', $pi['htmlcontent']) . '
  • '; + echo '
  • ' . TEXT_PRODUCTS_LARGE_IMAGE . '
    ' . tep_draw_file_field('products_image_large_' . $pi['id']) . '
    ' . $pi['image'] . '

    ' . TEXT_PRODUCTS_LARGE_IMAGE_HTML_CONTENT . '
    ' . tep_draw_textarea_field('products_image_htmlcontent_' . $pi['id'], '70', '3', $pi['htmlcontent']) . '
  • '; } ?> diff --git a/catalog/admin/define_language.php b/catalog/admin/define_language.php index 369eebd86..7354d2a22 100644 --- a/catalog/admin/define_language.php +++ b/catalog/admin/define_language.php @@ -123,7 +123,7 @@ function tep_opendir($path) { - + diff --git a/catalog/admin/includes/functions/general.php b/catalog/admin/includes/functions/general.php index fc4ccf9a5..0727886d2 100644 --- a/catalog/admin/includes/functions/general.php +++ b/catalog/admin/includes/functions/general.php @@ -715,7 +715,7 @@ function tep_cfg_pull_down_tax_classes($tax_class_id, $key = '') { //// // Function to read in text area in admin function tep_cfg_textarea($text) { - return tep_draw_textarea_field('configuration_value', false, 35, 5, $text); + return tep_draw_textarea_field('configuration_value', 35, 5, $text); } function tep_cfg_get_zone_name($zone_id) { diff --git a/catalog/admin/includes/functions/html_output.php b/catalog/admin/includes/functions/html_output.php index 377b0ac29..baf2fd507 100644 --- a/catalog/admin/includes/functions/html_output.php +++ b/catalog/admin/includes/functions/html_output.php @@ -245,8 +245,7 @@ function tep_draw_radio_field($name, $value = '', $checked = false, $compare = ' //// // Output a form textarea field -// The $wrap parameter is no longer used in the core xhtml template - function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { + function tep_draw_textarea_field($name, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $field = '