From: <sy...@us...> - 2010-07-07 15:01:35
|
Revision: 27885 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=27885&view=rev Author: sylvieg Date: 2010-07-07 15:01:29 +0000 (Wed, 07 Jul 2010) Log Message: ----------- [ENH]payment: param returnurl to go to a different page after payment Modified Paths: -------------- trunk/lib/smarty_tiki/function.payment.php Modified: trunk/lib/smarty_tiki/function.payment.php =================================================================== --- trunk/lib/smarty_tiki/function.payment.php 2010-07-07 14:13:40 UTC (rev 27884) +++ trunk/lib/smarty_tiki/function.payment.php 2010-07-07 15:01:29 UTC (rev 27885) @@ -5,6 +5,8 @@ // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ +// @param numeric $id: id of the payment +// @params url $returnurl: optional return url function smarty_function_payment( $params, $smarty ) { global $tikilib, $prefs; global $paymentlib; require_once 'lib/payment/paymentlib.php'; @@ -36,6 +38,9 @@ $info['fullview'] = $objectperms->payment_view; + if (!empty($params['returnurl'])) { + $info['url'] = preg_match('|^https?://|', $params['returnurl'])? $params['returnurl']: $tikilib->tikiUrl($params['returnurl']); + } $smarty->assign( 'payment_info', $info ); $smarty->assign( 'payment_detail', $tikilib->parse_data( htmlspecialchars($info['detail']) ) ); return $smarty->fetch( 'tiki-payment-single.tpl' ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |