Dirty Butter Posted March 24, 2016 Share Posted March 24, 2016 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? Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 24, 2016 Share Posted March 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 24, 2016 Author Share Posted March 24, 2016 Thanks - I took out the duplicate line. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.