datazen Posted April 22, 2006 Posted April 22, 2006 (edited) I have noticed a problem with the Links Manager contrib. I'm not sure which Links Manager contrib this is but it's the one that uses redirect.php. On the links page, the actual URL's of the partner sites always redirect you to the index page and not the partner site. After researching, I noticed that there was no switch for this in the redirect.php file. The POST data coming from the links.php page is similar to: http://www.mystore.com/catalog/redirect.php?action=links&goto=5 So I added: case 'links': if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) { $link_query = "select links_url from " . TABLE_LINKS . " where links_id=" . tep_db_input($HTTP_GET_VARS['goto']) . " limit 1"; $link_url = tep_db_query($link_query); // debug code echo 'table= ' . TABLE_LINKS . '<br>'; echo 'goto= ' . $HTTP_GET_VARS['goto'] . '<br>'; echo 'action= ' . $HTTP_GET_VARS['action'] . '<br>'; echo 'query= ' . $link_query . '<br>'; echo 'url= ' . $link_url . '<br>'; if (tep_db_num_rows($link_url)) { // tep_redirect('http://' . $HTTP_GET_VARS['goto']); } } break; The query string is correct but the tep_db_query never returns the url information. No matter what link I clik on the information for the url is returned as: url= Resource id #67 when it should have been: http://whatever_the_link_is.com I can manually do the query from phpMyAdmin with no problems. Why won't this db_query return the correct info? I simply want to query the links database for the url corresponding to the link_id. Any help is greatly appreciated. ;) Edited April 22, 2006 by datazen Quote
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.
Note: Your post will require moderator approval before it will be visible.