[TEP-COMMIT] CVS: catalog/catalog product_reviews_info.php,1.52,1.53

cvs-OfajU3CKLf1/[email protected]
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /pack/cvsroots/oscommerce/catalog/catalog
In directory sunsite.dk:/tmp/cvs-serv20796

Modified Files:
	product_reviews_info.php 
Log Message:
Fix bug 1375 by returning to the correct page when pressing the back button

Index: product_reviews_info.php
===================================================================
RCS file: /pack/cvsroots/oscommerce/catalog/catalog/product_reviews_info.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- product_reviews_info.php	2003/12/18 23:52:14	1.52
+++ product_reviews_info.php	2004/02/15 12:33:41	1.53
@@ -117,7 +117,18 @@
                     <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                       <tr>
                         <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
+<?php
+    $back = sizeof($navigation->path)-2;
+    if (isset($navigation->path[$back])) {
+?>
+                        <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
+<?php
+    } else {
+?>
                         <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id'))) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
+<?php
+    }
+?>
                         <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params(array('reviews_id'))) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>
                         <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                       </tr>



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.