Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions catalog/includes/application_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,17 +436,6 @@
}
}

// add the products model to the breadcrumb trail
if ( isset($_GET['products_id']) ) {
$model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$_GET['products_id'] . "'");

if (tep_db_num_rows($model_query)) {
$model = tep_db_fetch_array($model_query);

$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id']));
}
}

// TODO remove when no more global sessions exist
if ( $session_started == true ) {
extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);
Expand Down
2 changes: 1 addition & 1 deletion catalog/includes/classes/osc_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function buildBlocks() {
$modules_array = explode(';', constant($module_key));

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

if ( !class_exists($class) ) {
if ( file_exists(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/' . $group . '/' . $module) ) {
Expand Down
8 changes: 4 additions & 4 deletions catalog/includes/classes/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function payment($module = '') {
$include_modules[] = array('class' => $module, 'file' => $module . '.php');
} else {
foreach($this->modules as $value) {
$class = substr($value, 0, strrpos($value, '.'));
$class = basename($value, '.php');
$include_modules[] = array('class' => $class, 'file' => $value);
}
}
Expand Down Expand Up @@ -93,7 +93,7 @@ function javascript_validation() {
' }' . "\n\n";

foreach($this->modules as $value) {
$class = substr($value, 0, strrpos($value, '.'));
$class = basename($value, '.php');
if ($GLOBALS[$class]->enabled) {
$js .= $GLOBALS[$class]->javascript_validation();
}
Expand Down Expand Up @@ -121,7 +121,7 @@ function checkout_initialization_method() {

if (is_array($this->modules)) {
foreach($this->modules as $value) {
$class = substr($value, 0, strrpos($value, '.'));
$class = basename($value, '.php');
if ($GLOBALS[$class]->enabled && method_exists($GLOBALS[$class], 'checkout_initialization_method')) {
$initialize_array[] = $GLOBALS[$class]->checkout_initialization_method();
}
Expand All @@ -136,7 +136,7 @@ function selection() {

if (is_array($this->modules)) {
foreach($this->modules as $value) {
$class = substr($value, 0, strrpos($value, '.'));
$class = basename($value, '.php');
if ($GLOBALS[$class]->enabled) {
$selection = $GLOBALS[$class]->selection();
if (is_array($selection)) $selection_array[] = $selection;
Expand Down
4 changes: 2 additions & 2 deletions catalog/includes/classes/split_page_results.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ function display_links($max_page_links, $parameters = '') {
if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link($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;';

// check if number_of_pages > $max_page_links
$cur_window_num = intval($this->current_page_number / $max_page_links);
$cur_window_num = (int)($this->current_page_number / $max_page_links);
if ($this->current_page_number % $max_page_links) $cur_window_num++;

$max_window_num = intval($this->number_of_pages / $max_page_links);
$max_window_num = (int)($this->number_of_pages / $max_page_links);
if ($this->number_of_pages % $max_page_links) $max_window_num++;

// previous window of pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function execute() {
$social_bookmarks = array();

foreach ( $sbm_array as $sbm ) {
$class = substr($sbm, 0, strrpos($sbm, '.'));
$class = basename($sbm, '.php');

if ( !class_exists($class) ) {
include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/social_bookmarks/' . $sbm);
Expand Down
6 changes: 6 additions & 0 deletions catalog/product_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
$product_info = tep_db_fetch_array($product_info_query);

if (isset($product_info['products_model'])) {
// add the products model to the breadcrumb trail
$breadcrumb->add($product_info['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $product_info['products_id']));
}

require(DIR_WS_INCLUDES . 'template_top.php');

if (empty($product_info)) {
header('HTTP/1.0 404 Not Found');
?>

<div class="contentContainer">
Expand Down