View Single Post
  #1  
Old 06-05-2009, 02:33 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Upgrading X-Cart 4.1.9 to 4.1.12 with CDSEO

I posted this over at the WebsiteCM forum, but I'm thinking I should have posted here in the first place as it will probably get seen by more sets of eyes.

I am running a version of CDSEO Links from prior to the release of CDSEO Pro. I'm currently upgrading my cart from X-Cart Gold 4.1.9 to 4.1.12.

In merging the auth.php file, I'm having a bit of trouble with one spot of CDSEO code as there has been a bit of a change in the original X-Cart code.

The particular section has moved to using a conditional operator "?:" and I'm not sure how to merge in the CDSEO code. I've looked at the original 4.1.9 code, the 4.1.9 code with CDSEO Links added, and the 4.1.12 code and I definitely need a little help.

Here is the snippet of code from the stock 4.1.9 auth.php file:

Code:
if ($js_enabled == "Y") { $qry_string = ereg_replace("(&*)js=y", "", $QUERY_STRING); $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=n"; } else { $qry_string = ereg_replace("(&*)js=n", "", $QUERY_STRING); $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=y"; }

Here is the 4.1.9 snippet (CDSEO code already in) from the auth.php file:

Code:
if ($js_enabled == "Y") { $qry_string = ereg_replace("(&*)js=y", "", $QUERY_STRING); if ($cat != "" || $productid != "") { $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=n"; } else { // WebsiteCM - CDSEO Compatible $wcm_qs = "?" . $QUERY_STRING; $wcm_url = str_replace($wcm_qs,"",$_SERVER['REQUEST_URI']); $js_update_link = $wcm_url."?".($qry_string?"$qry_string&":"")."js=n"; } } else { $qry_string = ereg_replace("(&*)js=n", "", $QUERY_STRING); if ($cat != "" || $productid != "") { $js_update_link = $PHP_SELF."?".($qry_string?"$qry_string&":"")."js=y"; } else { // WebsiteCM - CDSEO Compatible $wcm_qs = "?" . $QUERY_STRING; $wcm_url = str_replace($wcm_qs,"",$_SERVER['REQUEST_URI']); $js_update_link = $wcm_url."?".($qry_string?"$qry_string&":"")."js=y"; } }

Here is the snippet of code from the stock 4.1.12 auth.php file:

Code:
$qry_string = func_qs_remove($QUERY_STRING, "js"); if ($qry_string) $qry_string .= "&"; $js_update_link = basename($PHP_SELF) . "?" . $qry_string . "js=" . ($js_enabled == "Y" ? "n" : "y"); unset($qry_string);

Can anyone give me some guidance or post the snippet from their modified 4.1.12 auth.php file? This is the only file I have left to patch and then I can go live with 4.1.12.

Thanks,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote