osCommerce Online Merchant v2.3.3.2

osCommerce Online Merchant v2.3.3.2 is a general maintenance release focusing on PHP 5.5 compatibility, improving core features, and introducing new modules.

This release is in preparation of v2.3.4 containing additional improvements.

Code Changes

The following changes have been applied:

Title Description Bug Severity Committer
PHP 5.5 Compatibility: Database Functions (8 files) Replace mysql function calls with mysqli functions. Add a mysqli compatibility layer for earlier PHP versions without native support for mysqli. Low Harald
Administrator Account Initialization (1 file) Prevent empty accounts being created when initializing an administrator account. 149 Low Harald
tep_catalog_href_link() (6 files) Take the catalog HTTPS path into consideration in the Administration Tool tep_catalog_href_link() function. 174 Low Harald
Administration Tool Navigation Menu (1 file) Collapse the Administration Tool navigation menu by default and use the default jQuery UI Accordion icons. 405 Low Gergely
Google+ Social Bookmark Modules (2 files) Add the language to the Google+ +1 and Google+ Share buttons. Low Gergely
Template Modules (1 file) Only include template modules if their class files exist. Low Harald
Canonical Header Tag Module (1 file) Link to the main product information page and ignore product attribute combinations. Low Gary
osCommerce Logo (1 file) Update the osCommerce logo image shown in the Administration Tool. Low Harald
Version Update (1 file) Update version to v2.3.3.2.

New Modules

The following modules have been added:

Title Description Committer
Partner News Administration Tool Dashboard Module Show the latest partner news in the Administration Tool Dashboard. Harald
Twitter Product Card Header Tag Module Adds Twitter Product Card meta tags to the product information page. Gary
Google AdWords Conversion Tracking Header Tag Module Adds Google AdWords Conversion Tracking code to the checkout success page. Gary

API Changes

The following API changes have been applied:

Title Description
Catalog HTTPS Directory for the Administration Tool Added new DIR_WS_HTTPS_CATALOG Administration Tool configuration parameter to correctly link to the shop frontend when HTTPS links are used.

Language Definitions

The following languages definitions have been modified:

Language File Definitions Status
modules/dashboard/d_partner_news.php MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_TITLE
MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_DESCRIPTION
MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_MORE_TITLE
MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_ERROR_JSON_DECODE
New
New
New
New
modules/header_tags/ht_twitter_product_card.php MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TITLE
MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_DESCRIPTION
MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_PRE_ORDER
MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_IN_STOCK
MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_OUT_OF_STOCK
MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_BUY_NOW
MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_CONTACT_US
New
New
New
New
New
New
New
modules/header_tags/ht_google_adwords_conversion.php MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_TITLE
MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_DESCRIPTION
New
New

Upgrading from v2.3.3.1

Modified Files

Files that have been modified in this release include:

Modified Files
admin/action_recorder.php
admin/categories.php
admin/images/oscommerce.png
admin/includes/column_left.php
admin/includes/configure.php
admin/includes/functions/database.php
admin/includes/functions/general.php
admin/includes/functions/html_output.php
admin/languages.php
admin/login.php
admin/manufacturers.php
admin/orders_status.php
includes/classes/osc_template.php
includes/functions/database.php
includes/modules/action_recorder/ar_admin_login.php
includes/modules/action_recorder/ar_contact_us.php
includes/modules/action_recorder/ar_reset_password.php
includes/modules/action_recorder/ar_tell_a_friend.php
includes/modules/header_tags/ht_canonical.php
includes/modules/social_bookmarks/sb_google_plus_one.php
includes/modules/social_bookmarks/sb_google_plus_share.php
includes/version.php

New Files

Files that have been added to this release include:

New Files
admin/includes/languages/english/modules/dashboard/d_partner_news.php
admin/includes/modules/dashboard/d_partner_news.php
includes/languages/english/modules/header_tags/ht_google_adwords_conversion.php
includes/languages/english/modules/header_tags/ht_twitter_product_card.php
includes/modules/header_tags/ht_google_adwords_conversion.php
includes/modules/header_tags/ht_twitter_product_card.php

File Changes

PHP 5.5 Compatibility: Database Functions (8 files)

admin/action_recorder.php

around line 67, change:

$expired_entries += mysql_affected_rows($db_link);

to:

$expired_entries += tep_db_affected_rows($db_link);

admin/includes/functions/database.php

change tep_db_connect() from:

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
  global $$link;

  if (USE_PCONNECT == 'true') {
    $$link = mysql_pconnect($server, $username, $password);
  } else {
    $$link = mysql_connect($server, $username, $password);
  }

  if ($$link) mysql_select_db($database);

  return $$link;
}

to:

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
  global $$link;

  if (USE_PCONNECT == 'true') {
    $server = 'p:' . $server;
  }

  $$link = mysqli_connect($server, $username, $password, $database);

  return $$link;
}

change tep_db_close() from:

function tep_db_close($link = 'db_link') {
  global $$link;

  return mysql_close($$link);
}

to:

function tep_db_close($link = 'db_link') {
  global $$link;

  return mysqli_close($$link);
}

change tep_db_query() from:

function tep_db_query($query, $link = 'db_link') {
  global $$link, $logger;

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
    if (!is_object($logger)) $logger = new logger;
    $logger->write($query, 'QUERY');
  }

  $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
    if (mysql_error()) $logger->write(mysql_error(), 'ERROR');
  }

  return $result;
}

to:

function tep_db_query($query, $link = 'db_link') {
  global $$link, $logger;

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
    if (!is_object($logger)) $logger = new logger;
    $logger->write($query, 'QUERY');
  }

  $result = mysqli_query($$link, $query) or tep_db_error($query, mysqli_errno($$link), mysqli_error($$link));

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
    if (mysqli_error($$link)) $logger->write(mysqli_error($llink), 'ERROR');
  }

  return $result;
}

change tep_db_fetch_array() from:

function tep_db_fetch_array($db_query) {
  return mysql_fetch_array($db_query, MYSQL_ASSOC);
}

to:

function tep_db_fetch_array($db_query) {
  return mysqli_fetch_array($db_query, MYSQLI_ASSOC);
}

change tep_db_result() from:

function tep_db_result($result, $row, $field = '') {
  return mysql_result($result, $row, $field);
}

to:

function tep_db_result($result, $row, $field = '') {
  if ( $field === '' ) {
    $field = 0;
  }

  tep_db_data_seek($result, $row);
  $data = tep_db_fetch_array($result);

  return $data[$field];
}

change tep_db_num_rows() from:

function tep_db_num_rows($db_query) {
  return mysql_num_rows($db_query);
}

to:

function tep_db_num_rows($db_query) {
  return mysqli_num_rows($db_query);
}

change tep_db_data_seek() from:

function tep_db_data_seek($db_query, $row_number) {
  return mysql_data_seek($db_query, $row_number);
}

to:

function tep_db_data_seek($db_query, $row_number) {
  return mysqli_data_seek($db_query, $row_number);
}

change tep_db_insert_id() from:

function tep_db_insert_id($link = 'db_link') {
  global $$link;

  return mysql_insert_id($$link);
}

to:

function tep_db_insert_id($link = 'db_link') {
  global $$link;

  return mysqli_insert_id($$link);
}

change tep_db_free_result() from:

function tep_db_free_result($db_query) {
  return mysql_free_result($db_query);
}

to:

function tep_db_free_result($db_query) {
  return mysqli_free_result($db_query);
}

change tep_db_fetch_fields() from:

function tep_db_fetch_fields($db_query) {
  return mysql_fetch_field($db_query);
}

to:

function tep_db_fetch_fields($db_query) {
  return mysqli_fetch_field($db_query);
}

change tep_db_input() from:

function tep_db_input($string, $link = 'db_link') {
  global $$link;

  if (function_exists('mysql_real_escape_string')) {
    return mysql_real_escape_string($string, $$link);
  } elseif (function_exists('mysql_escape_string')) {
    return mysql_escape_string($string);
  }

  return addslashes($string);
}

to:

function tep_db_input($string, $link = 'db_link') {
  global $$link;

  return mysqli_real_escape_string($$link, $string);
}

at the end of the file, before the closing ?> PHP tag, add:

function tep_db_affected_rows($link = 'db_link') {
  global $$link;

  return mysqli_affected_rows($$link);
}

function tep_db_get_server_info($link = 'db_link') {
  global $$link;

  return mysqli_get_server_info($$link);
}

if ( !function_exists('mysqli_connect') ) {
  define('MYSQLI_ASSOC', MYSQL_ASSOC);

  function mysqli_connect($server, $username, $password, $database) {
    if ( substr($server, 0, 2) == 'p:' ) {
      $link = mysql_pconnect(substr($server, 2), $username, $password);
    } else {
      $link = mysql_connect($server, $username, $password);
    }

    if ( $link ) {
      mysql_select_db($database, $link);
    }

    return $link;
  }

  function mysqli_close($link) {
    return mysql_close($link);
  }

  function mysqli_query($link, $query) {
    return mysql_query($query, $link);
  }

  function mysqli_errno($link = null) {
    return mysql_errno($link);
  }

  function mysqli_error($link = null) {
    return mysql_error($link);
  }

  function mysqli_fetch_array($query, $type) {
    return mysql_fetch_array($query, $type);
  }

  function mysqli_num_rows($query) {
    return mysql_num_rows($query);
  }

  function mysqli_data_seek($query, $offset) {
    return mysql_data_seek($query, $offset);
  }

  function mysqli_insert_id($link) {
    return mysql_insert_id($link);
  }

  function mysqli_free_result($query) {
    return mysql_free_result($query);
  }

  function mysqli_fetch_field($query) {
    return mysql_fetch_field($query);
  }

  function mysqli_real_escape_string($link, $string) {
    if ( function_exists('mysql_real_escape_string') ) {
      return mysql_real_escape_string($string, $link);
    } elseif ( function_exists('mysql_escape_string') ) {
      return mysql_escape_string($string);
    }

    return addslashes($string);
  }

  function mysqli_affected_rows($link) {
    return mysql_affected_rows($link);
  }

  function mysqli_get_server_info($link) {
    return mysql_get_server_info($link);
  }
}

admin/includes/functions/general.php

change tep_get_system_information() from:

function tep_get_system_information() {
  global $HTTP_SERVER_VARS;

  $db_query = tep_db_query("select now() as datetime");
  $db = tep_db_fetch_array($db_query);

  @list($system, $host, $kernel) = preg_split('/[\s,]+/', @exec('uname -a'), 5);

  $data = array();

  $data['oscommerce']  = array('version' => tep_get_version());

  $data['system'] = array('date' => date('Y-m-d H:i:s O T'),
                          'os' => PHP_OS,
                          'kernel' => $kernel,
                          'uptime' => @exec('uptime'),
                          'http_server' => $HTTP_SERVER_VARS['SERVER_SOFTWARE']);

  $data['mysql']  = array('version' => (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''),
                          'date' => $db['datetime']);

  $data['php']    = array('version' => PHP_VERSION,
                          'zend' => zend_version(),
                          'sapi' => PHP_SAPI,
                          'int_size'  => defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '',
                          'safe_mode' => (int) @ini_get('safe_mode'),
                          'open_basedir' => (int) @ini_get('open_basedir'),
                          'memory_limit' => @ini_get('memory_limit'),
                          'error_reporting' => error_reporting(),
                          'display_errors' => (int)@ini_get('display_errors'),
                          'allow_url_fopen' => (int) @ini_get('allow_url_fopen'),
                          'allow_url_include' => (int) @ini_get('allow_url_include'),
                          'file_uploads' => (int) @ini_get('file_uploads'),
                          'upload_max_filesize' => @ini_get('upload_max_filesize'),
                          'post_max_size' => @ini_get('post_max_size'),
                          'disable_functions' => @ini_get('disable_functions'),
                          'disable_classes' => @ini_get('disable_classes'),
                          'enable_dl' => (int) @ini_get('enable_dl'),
                          'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'),
                          'register_globals' => (int) @ini_get('register_globals'),
                          'filter.default'   => @ini_get('filter.default'),
                          'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'),
                          'unicode.semantics' => (int) @ini_get('unicode.semantics'),
                          'zend_thread_safty' => (int) function_exists('zend_thread_id'),
                          'extensions' => get_loaded_extensions());

  return $data;
}

to:

function tep_get_system_information() {
  global $HTTP_SERVER_VARS;

  $db_query = tep_db_query("select now() as datetime");
  $db = tep_db_fetch_array($db_query);

  @list($system, $host, $kernel) = preg_split('/[\s,]+/', @exec('uname -a'), 5);

  $data = array();

  $data['oscommerce']  = array('version' => tep_get_version());

  $data['system'] = array('date' => date('Y-m-d H:i:s O T'),
                          'os' => PHP_OS,
                          'kernel' => $kernel,
                          'uptime' => @exec('uptime'),
                          'http_server' => $HTTP_SERVER_VARS['SERVER_SOFTWARE']);

  $data['mysql']  = array('version' => tep_db_get_server_info(),
                          'date' => $db['datetime']);

  $data['php']    = array('version' => PHP_VERSION,
                          'zend' => zend_version(),
                          'sapi' => PHP_SAPI,
                          'int_size'  => defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '',
                          'safe_mode' => (int) @ini_get('safe_mode'),
                          'open_basedir' => (int) @ini_get('open_basedir'),
                          'memory_limit' => @ini_get('memory_limit'),
                          'error_reporting' => error_reporting(),
                          'display_errors' => (int)@ini_get('display_errors'),
                          'allow_url_fopen' => (int) @ini_get('allow_url_fopen'),
                          'allow_url_include' => (int) @ini_get('allow_url_include'),
                          'file_uploads' => (int) @ini_get('file_uploads'),
                          'upload_max_filesize' => @ini_get('upload_max_filesize'),
                          'post_max_size' => @ini_get('post_max_size'),
                          'disable_functions' => @ini_get('disable_functions'),
                          'disable_classes' => @ini_get('disable_classes'),
                          'enable_dl' => (int) @ini_get('enable_dl'),
                          'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'),
                          'register_globals' => (int) @ini_get('register_globals'),
                          'filter.default'   => @ini_get('filter.default'),
                          'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'),
                          'unicode.semantics' => (int) @ini_get('unicode.semantics'),
                          'zend_thread_safty' => (int) function_exists('zend_thread_id'),
                          'extensions' => get_loaded_extensions());

  return $data;
}

includes/functions/database.php

change tep_db_connect() from:

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
  global $$link;

  if (USE_PCONNECT == 'true') {
    $$link = mysql_pconnect($server, $username, $password);
  } else {
    $$link = mysql_connect($server, $username, $password);
  }

  if ($$link) mysql_select_db($database);

  return $$link;
}

to:

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
  global $$link;

  if (USE_PCONNECT == 'true') {
    $server = 'p:' . $server;
  }

  $$link = mysqli_connect($server, $username, $password, $database);

  return $$link;
}

change tep_db_close() from:

function tep_db_close($link = 'db_link') {
  global $$link;

  return mysql_close($$link);
}

to:

function tep_db_close($link = 'db_link') {
  global $$link;

  return mysqli_close($$link);
}

change tep_db_query() from:

function tep_db_query($query, $link = 'db_link') {
  global $$link;

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
    error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
  }

  $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
     $result_error = mysql_error();
     error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
  }

  return $result;
}

to:

function tep_db_query($query, $link = 'db_link') {
  global $$link;

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
    error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
  }

  $result = mysqli_query($$link, $query) or tep_db_error($query, mysqli_errno($$link), mysqli_error($$link));

  if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
     $result_error = mysqli_error($$link);
     error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
  }

  return $result;
}

change tep_db_fetch_array() from:

function tep_db_fetch_array($db_query) {
  return mysql_fetch_array($db_query, MYSQL_ASSOC);
}

to:

function tep_db_fetch_array($db_query) {
  return mysqli_fetch_array($db_query, MYSQLI_ASSOC);
}

change tep_db_num_rows() from:

function tep_db_num_rows($db_query) {
  return mysql_num_rows($db_query);
}

to:

function tep_db_num_rows($db_query) {
  return mysqli_num_rows($db_query);
}

change tep_db_data_seek() from:

function tep_db_data_seek($db_query, $row_number) {
  return mysql_data_seek($db_query, $row_number);
}

to:

function tep_db_data_seek($db_query, $row_number) {
  return mysqli_data_seek($db_query, $row_number);
}

change tep_db_insert_id() from:

function tep_db_insert_id($link = 'db_link') {
  global $$link;

  return mysql_insert_id($$link);
}

to:

function tep_db_insert_id($link = 'db_link') {
  global $$link;

  return mysqli_insert_id($$link);
}

change tep_db_free_result() from:

function tep_db_free_result($db_query) {
  return mysql_free_result($db_query);
}

to:

function tep_db_free_result($db_query) {
  return mysqli_free_result($db_query);
}

change tep_db_fetch_fields() from:

function tep_db_fetch_fields($db_query) {
  return mysql_fetch_field($db_query);
}

to:

function tep_db_fetch_fields($db_query) {
  return mysqli_fetch_field($db_query);
}

change tep_db_input() from:

function tep_db_input($string, $link = 'db_link') {
  global $$link;

  if (function_exists('mysql_real_escape_string')) {
    return mysql_real_escape_string($string, $$link);
  } elseif (function_exists('mysql_escape_string')) {
    return mysql_escape_string($string);
  }

  return addslashes($string);
}

to:

function tep_db_input($string, $link = 'db_link') {
  global $$link;

  return mysqli_real_escape_string($$link, $string);
}

at the end of the file, before the closing ?> PHP tag, add:

function tep_db_affected_rows($link = 'db_link') {
  global $$link;

  return mysqli_affected_rows($$link);
}

function tep_db_get_server_info($link = 'db_link') {
  global $$link;

  return mysqli_get_server_info($$link);
}

if ( !function_exists('mysqli_connect') ) {
  define('MYSQLI_ASSOC', MYSQL_ASSOC);

  function mysqli_connect($server, $username, $password, $database) {
    if ( substr($server, 0, 2) == 'p:' ) {
      $link = mysql_pconnect(substr($server, 2), $username, $password);
    } else {
      $link = mysql_connect($server, $username, $password);
    }

    if ( $link ) {
      mysql_select_db($database, $link);
    }

    return $link;
  }

  function mysqli_close($link) {
    return mysql_close($link);
  }

  function mysqli_query($link, $query) {
    return mysql_query($query, $link);
  }

  function mysqli_errno($link = null) {
    return mysql_errno($link);
  }

  function mysqli_error($link = null) {
    return mysql_error($link);
  }

  function mysqli_fetch_array($query, $type) {
    return mysql_fetch_array($query, $type);
  }

  function mysqli_num_rows($query) {
    return mysql_num_rows($query);
  }

  function mysqli_data_seek($query, $offset) {
    return mysql_data_seek($query, $offset);
  }

  function mysqli_insert_id($link) {
    return mysql_insert_id($link);
  }

  function mysqli_free_result($query) {
    return mysql_free_result($query);
  }

  function mysqli_fetch_field($query) {
    return mysql_fetch_field($query);
  }

  function mysqli_real_escape_string($link, $string) {
    if ( function_exists('mysql_real_escape_string') ) {
      return mysql_real_escape_string($string, $link);
    } elseif ( function_exists('mysql_escape_string') ) {
      return mysql_escape_string($string);
    }

    return addslashes($string);
  }

  function mysqli_affected_rows($link) {
    return mysql_affected_rows($link);
  }

  function mysqli_get_server_info($link) {
    return mysql_get_server_info($link);
  }
}

includes/modules/action_recorder/ar_admin_login.php

change expireEntries() from:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return mysql_affected_rows($db_link);
}

to:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return tep_db_affected_rows($db_link);
}

includes/modules/action_recorder/ar_contact_us.php

change expireEntries() from:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return mysql_affected_rows($db_link);
}

to:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return tep_db_affected_rows($db_link);
}

includes/modules/action_recorder/ar_reset_password.php

change expireEntries() from:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return mysql_affected_rows($db_link);
}

to:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return tep_db_affected_rows($db_link);
}

includes/modules/action_recorder/ar_tell_a_friend.php

change expireEntries() from:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return mysql_affected_rows($db_link);
}

to:

function expireEntries() {
  global $db_link;

  tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . $this->code . "' and date_added < date_sub(now(), interval " . (int)$this->minutes  . " minute)");

  return tep_db_affected_rows($db_link);
}

View online at GitHub

Administrator Account Initialization (1 file)

admin/login.php

around line 103, change from:

tep_db_query("insert into " . TABLE_ADMINISTRATORS . " (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')");

to:

if ( !empty($username) ) {
  tep_db_query("insert into " . TABLE_ADMINISTRATORS . " (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')");
}

View online at GitHub

tep_catalog_href_link() (6 files)

admin/categories.php

around line 534, change from:

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (empty($pInfo->products_id) ? '' : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>

to:

<td class="main"><?php echo tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (empty($pInfo->products_id) ? '' : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>

around line 567, change from:

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>

to:

<td class="main" valign="top"><?php echo tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']); ?>&nbsp;</td>

around line 668, change from:

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>

to:

<td class="main"><?php echo tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>

around line 715, change from:

<td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name; ?></td>

to:

<td class="pageHeading"><?php echo tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name; ?></td>

around line 935, change from:

$category_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']');

to:

$category_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']');

around line 952, change from:

$category_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id']));

to:

$category_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id']));

admin/includes/configure.php

add the DIR_WS_HTTPS_CATALOG configuration parameter with the same value from includes/configure.php:

define('DIR_WS_HTTPS_CATALOG', '/shop/');

admin/includes/functions/html_output.php

change tep_catalog_href_link() from:

function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
  if ($connection == 'NONSSL') {
    $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
  } elseif ($connection == 'SSL') {
    if (ENABLE_SSL_CATALOG == 'true') {
      $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;
    } else {
      $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
    }
  } else {
    die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL<br /><br />Function used:<br /><br />tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</strong>');
  }
  if ($parameters == '') {
    $link .= $page;
  } else {
    $link .= $page . '?' . $parameters;
  }

  while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

  return $link;
}

to:

function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
  if ($connection == 'NONSSL') {
    $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
  } elseif ($connection == 'SSL') {
    if (ENABLE_SSL_CATALOG == 'true') {
      $link = HTTPS_CATALOG_SERVER . (defined('DIR_WS_HTTPS_CATALOG') ? DIR_WS_HTTPS_CATALOG : DIR_WS_CATALOG);
    } else {
      $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
    }
  } else {
    die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL<br /><br />Function used:<br /><br />tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</strong>');
  }
  if ($parameters == '') {
    $link .= $page;
  } else {
    $link .= $page . '?' . $parameters;
  }

  while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

  return $link;
}

admin/languages.php

around line 233, change from:

$contents[] = array('text' => '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $lInfo->directory . '/images/' . $lInfo->image, $lInfo->name));

to:

$contents[] = array('text' => '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $lInfo->directory . '/images/' . $lInfo->image, '', 'SSL'), $lInfo->name));

admin/manufacturers.php

around line 185, change from:

$manufacturer_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');

to:

$manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');

around line 202, change from:

$manufacturer_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));

to:

$manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));

admin/orders_status.php

around line 177, change from:

$orders_status_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('orders_status_name[' . $languages[$i]['id'] . ']');

to:

$orders_status_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('orders_status_name[' . $languages[$i]['id'] . ']');

around line 195, change from:

$orders_status_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('orders_status_name[' . $languages[$i]['id'] . ']', tep_get_orders_status_name($oInfo->orders_status_id, $languages[$i]['id']));

to:

$orders_status_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('orders_status_name[' . $languages[$i]['id'] . ']', tep_get_orders_status_name($oInfo->orders_status_id, $languages[$i]['id']));

around line 221, change from:

$orders_status_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_get_orders_status_name($oInfo->orders_status_id, $languages[$i]['id']);

to:

$orders_status_inputs_string .= '<br />' . tep_image(tep_catalog_href_link(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_get_orders_status_name($oInfo->orders_status_id, $languages[$i]['id']);

View online at GitHub

Administration Tool Navigation Menu (1 file)

admin/includes/column_left.php

around line 43, change the javascript block from:

<script type="text/javascript">
$('#adminAppMenu').accordion({
  autoHeight: false,
  icons: {
    'header': 'ui-icon-plus',
    'headerSelected': 'ui-icon-minus'
  }

<?php
    $counter = 0;
    foreach ($cl_box_groups as $groups) {
      foreach ($groups['apps'] as $app) {
        if ($app['code'] == $PHP_SELF) {
          echo ',active: ' . $counter;
          break;
        }
      }

      $counter++;
    }
?>

});
</script>

to:

<script type="text/javascript">
$('#adminAppMenu').accordion({
  autoHeight: false,
  collapsible: true,

<?php
    $counter = 0;
    foreach ($cl_box_groups as $groups) {
      foreach ($groups['apps'] as $app) {
        if ($app['code'] == $PHP_SELF) {
          break 2;
        }
      }

      $counter++;
    }

    echo 'active: ' . (isset($app) && ($app['code'] == $PHP_SELF) ? $counter : 'false');
?>

});
</script>

View online at GitHub

Google+ Social Bookmark Modules (2 files)

includes/modules/social_bookmarks/sb_google_plus_one.php

change getOutput() from:

function getOutput() {
  global $HTTP_GET_VARS;

  $output = '<div class="g-plusone" data-href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" data-size="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_SIZE) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION) . '"';

  if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION == 'Inline') {
    $output.= ' data-width="' . (int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_WIDTH . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ALIGN) . '"';
  }

  $output .= '></div>';

  $output .= '<script type="text/javascript">
  (function() {
    var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
    po.src = \'https://apis.google.com/js/plusone.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>';

  return $output;
}

to:

function getOutput() {
  global $HTTP_GET_VARS, $lng, $languages_id;

  if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language;
  }

  foreach ($lng->catalog_languages as $lkey => $lvalue) {
    if ($lvalue['id'] == $languages_id) {
      $language_code = $lkey;
      break;
    }
  }

  $output = '<div class="g-plusone" data-href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" data-size="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_SIZE) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION) . '"';

  if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION == 'Inline') {
    $output.= ' data-width="' . (int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_WIDTH . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ALIGN) . '"';
  }

  $output .= '></div>';

  $output .= '<script type="text/javascript">
  if ( typeof window.___gcfg == "undefined" ) {
    window.___gcfg = { };
  }

  if ( typeof window.___gcfg.lang == "undefined" ) {
    window.___gcfg.lang = "' . tep_output_string_protected($language_code) . '";
  }

  (function() {
    var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
    po.src = \'https://apis.google.com/js/plusone.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>';

  return $output;
}

includes/modules/social_bookmarks/sb_google_plus_share.php

Change getOutput() from:

function getOutput() {
  global $HTTP_GET_VARS;

  $button_height = (int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_HEIGHT;

  if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION == 'Vertical-Bubble') {
    $button_height = 60;
  }

  $output = '<div class="g-plus" data-action="share" data-href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION) . '"';

  if ((int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH > 0) {
    $output .= ' data-width="' . (int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH . '"';
  }

  $output .= ' data-height="' . $button_height . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ALIGN) . '"></div>';

  $output .= '<script type="text/javascript">
  (function() {
    var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
    po.src = \'https://apis.google.com/js/plusone.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>';

  return $output;
}

to:

function getOutput() {
  global $HTTP_GET_VARS, $lng, $languages_id;

  if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language;
  }

  foreach ($lng->catalog_languages as $lkey => $lvalue) {
    if ($lvalue['id'] == $languages_id) {
      $language_code = $lkey;
      break;
    }
  }

  $button_height = (int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_HEIGHT;

  if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION == 'Vertical-Bubble') {
    $button_height = 60;
  }

  $output = '<div class="g-plus" data-action="share" data-href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION) . '"';

  if ((int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH > 0) {
    $output .= ' data-width="' . (int)MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH . '"';
  }

  $output .= ' data-height="' . $button_height . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ALIGN) . '"></div>';

  $output .= '<script type="text/javascript">
  if ( typeof window.___gcfg == "undefined" ) {
    window.___gcfg = { };
  }

  if ( typeof window.___gcfg.lang == "undefined" ) {
    window.___gcfg.lang = "' . tep_output_string_protected($language_code) . '";
  }

  (function() {
    var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
    po.src = \'https://apis.google.com/js/plusone.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>';

  return $output;
}

View online at GitHub

Template Modules (1 file)

includes/classes/osc_template.php

Change buildBlocks() from:

function buildBlocks() {
  global $language;

  if ( defined('TEMPLATE_BLOCK_GROUPS') && tep_not_null(TEMPLATE_BLOCK_GROUPS) ) {
    $tbgroups_array = explode(';', TEMPLATE_BLOCK_GROUPS);

    foreach ($tbgroups_array as $group) {
      $module_key = 'MODULE_' . strtoupper($group) . '_INSTALLED';

      if ( defined($module_key) && tep_not_null(constant($module_key)) ) {
        $modules_array = explode(';', constant($module_key));

        foreach ( $modules_array as $module ) {
          $class = substr($module, 0, strrpos($module, '.'));

          if ( !class_exists($class) ) {
            include(DIR_WS_LANGUAGES . $language . '/modules/' . $group . '/' . $module);
            include(DIR_WS_MODULES . $group . '/' . $class . '.php');
          }

          $mb = new $class();

          if ( $mb->isEnabled() ) {
            $mb->execute();
          }
        }
      }
    }
  }
}

to:

function buildBlocks() {
  global $language;

  if ( defined('TEMPLATE_BLOCK_GROUPS') && tep_not_null(TEMPLATE_BLOCK_GROUPS) ) {
    $tbgroups_array = explode(';', TEMPLATE_BLOCK_GROUPS);

    foreach ($tbgroups_array as $group) {
      $module_key = 'MODULE_' . strtoupper($group) . '_INSTALLED';

      if ( defined($module_key) && tep_not_null(constant($module_key)) ) {
        $modules_array = explode(';', constant($module_key));

        foreach ( $modules_array as $module ) {
          $class = substr($module, 0, strrpos($module, '.'));

          if ( !class_exists($class) ) {
            if ( file_exists(DIR_WS_LANGUAGES . $language . '/modules/' . $group . '/' . $module) ) {
              include(DIR_WS_LANGUAGES . $language . '/modules/' . $group . '/' . $module);
            }

            if ( file_exists(DIR_WS_MODULES . $group . '/' . $class . '.php') ) {
              include(DIR_WS_MODULES . $group . '/' . $class . '.php');
            }
          }

          if ( class_exists($class) ) {
            $mb = new $class();

            if ( $mb->isEnabled() ) {
              $mb->execute();
            }
          }
        }
      }
    }
  }
}

View online at GitHub

Canonical Header Tag Module (1 file)

includes/modules/header_tags/ht_canonical.php

Change execute() from:

function execute() {
  global $PHP_SELF, $HTTP_GET_VARS, $cPath, $oscTemplate;

  if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) {
    $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
  } elseif (basename($PHP_SELF) == FILENAME_DEFAULT) {
    if (isset($cPath) && tep_not_null($cPath)) {
      $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath, 'NONSSL', false) . '" />' . "\n", $this->group);
    } elseif (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
      $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
    }
  }
}

to:

function execute() {
  global $PHP_SELF, $HTTP_GET_VARS, $cPath, $oscTemplate;

  if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) {
    $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
  } elseif (basename($PHP_SELF) == FILENAME_DEFAULT) {
    if (isset($cPath) && tep_not_null($cPath)) {
      $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath, 'NONSSL', false) . '" />' . "\n", $this->group);
    } elseif (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
      $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
    }
  }
}

View online at GitHub

osCommerce Logo (1 file)

admin/images/oscommerce.png

Replace the existing image with the new image file.

View online at GitHub

Version Update (1 file)

includes/version.php

change line 1 from:

2.3.3.1

to:

2.3.3.2

View online at GitHub

Partner News Administration Tool Dashboard Module

Copy the following files to their respective directories:

admin/includes/languages/english/modules/dashboard/d_partner_news.php
admin/includes/modules/dashboard/d_partner_news.php

The module can be enabled at the Administration Tool -> Modules -> Dashboard -> Install Module page.
Please also copy and update the language definition file to the other languages you have installed.

View online at GitHub

Twitter Product Card Header Tag Module

Copy the following files to their respective directories:

includes/languages/english/modules/header_tags/ht_twitter_product_card.php
includes/modules/header_tags/ht_twitter_product_card.php

The module can be enabled at the Administration Tool -> Modules -> Header Tags -> Install Module page.
Please also copy and update the language definition file to the other languages you have installed.

View online at GitHub

Google AdWords Conversion Tracking Header Tag Module

Copy the following files to their respective directories:

includes/languages/english/modules/header_tags/ht_google_adwords_conversion.php
includes/modules/header_tags/ht_google_adwords_conversion.php

The module can be enabled at the Administration Tool -> Modules -> Header Tags -> Install Module page.
Please also copy and update the language definition file to the other languages you have installed.

View online at GitHub

Thank You!

We'd like to thank the community for their feedback on our releases. In addition, we thank the following people who participated in the development of this release.

Bug Reporters
GniDhal
kymation

Reference

A full list of source code changes can be seen at:

https://github.com/osCommerce/oscommerce2/compare/v2.3.3.1...upgrade2332