Jump to content

[Resolved] Error in merging old version edits to upgrade


Recommended Posts

I have this code in 6.0.11 cubecart.class.php:

// BSMITHER ORIGINAL NOT FOUND SEARCH RESULTS REPLACED WITH "FOUND" CODE SO SEARCH ATTEMPT SHOWS FOR CUSTOMER
				//$GLOBALS['catalogue']->setCategory('cat_name', $GLOBALS['language']->navigation['search_results']);
				$GLOBALS['gui']->addBreadcrumb($GLOBALS['language']->common['search'], 'index.php?_a=search'); //NEW 6.0.9

$GLOBALS['catalogue']->setCategory('cat_name', sprintf($GLOBALS['language']->catalogue['notify_product_search'],$_REQUEST['search']['keywords']));
				$GLOBALS['catalogue']->setCategory('cat_name', sprintf($GLOBALS['language']->catalogue['notify_product_search'], htmlspecialchars(stripslashes($_REQUEST['search']['keywords']))));
				$GLOBALS['gui']->addBreadcrumb($GLOBALS['language']->navigation['search_results'], currentPage());
				$GLOBALS['gui']->setError($GLOBALS['language']->catalogue['error_search_no_results']);
			} else {
				$GLOBALS['catalogue']->setCategory('cat_name', sprintf($GLOBALS['language']->catalogue['notify_product_search'], htmlspecialchars(stripslashes($_REQUEST['search']['keywords']))));
				$GLOBALS['gui']->addBreadcrumb($GLOBALS['language']->common['search'], 'index.php?_a=search');
				$GLOBALS['gui']->addBreadcrumb($GLOBALS['language']->navigation['search_results'], currentPage());
			}
		} else {

Is there a problem with my attempt to merge old code with 6.0.11?

Link to comment
Share on other sites

What does the edits for cubecart.class.php version 6.0.10 or earlier have?

Of the two, the first statement is redundant to the second.

$GLOBALS['catalogue']->setCategory('cat_name',sprintf($GLOBALS['language']->catalogue['notify_product_search'],$_REQUEST['search']['keywords']));
$GLOBALS['catalogue']->setCategory('cat_name',sprintf($GLOBALS['language']->catalogue['notify_product_search'],htmlspecialchars(stripslashes($_REQUEST['search']['keywords']))));

Keep the second statement.

Otherwise, it looks good to me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...