Jump to content



Issue Information

  • #000590

  • 0 - None Assigned

  • New

  • 2.3.3

  • -

Issue Confirmations

  • Yes (0)No (0)
Photo

cPath inconsequences

Posted by Gergely on 05 April 2013 - 01:28 PM

Hi,

Look at these similar links:
http://demo.oscommerce.com/index.php?cPath=300_15
http://demo.oscommerce.com/index.php?cPath=3_15
http://demo.oscommerce.com/index.php?cPath=345_2345234_52353_15
http://demo.oscommerce.com/index.php?cPath=_15
http://demo.oscommerce.com/index.php?cPath=15


I think would be very good if a controll works recursively in tep_parse_category_path function and run to 404 Page if not exist...

First solution is edit in application top:

	  if (tep_db_num_rows($categories_query) > 0) {
		$categories = tep_db_fetch_array($categories_query);
		$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
	  } else {
		break;
	  }

to:
	  if (tep_db_num_rows($categories_query) > 0) {
		$categories = tep_db_fetch_array($categories_query);
		$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
	  } else {
		header("HTTP/1.0 404 Not Found");
		exit;
	  }