Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -368,20 +368,40 @@ class _History extends \IPS\Helpers\Table\Db
|
||||
switch ( $val['type'] )
|
||||
{
|
||||
case 'used':
|
||||
/* If the customer who used this gift card no longer exists, then we need to load up a guest customer object to avoid an OutOfRangeException */
|
||||
try
|
||||
{
|
||||
$customer = \IPS\nexus\Customer::load( $val['by'] );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$customer = new \IPS\nexus\Customer;
|
||||
}
|
||||
|
||||
return
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'history_giftvoucher_used', FALSE, array( 'htmlsprintf' => array(
|
||||
new \IPS\nexus\Money( $val['amount'], $currency ),
|
||||
$val['code'],
|
||||
\IPS\Theme::i()->getTemplate('global', 'nexus')->userLink( \IPS\nexus\Customer::load( $val['by'] ) )
|
||||
\IPS\Theme::i()->getTemplate('global', 'nexus')->userLink( $customer )
|
||||
) ) );
|
||||
break;
|
||||
|
||||
case 'redeemed':
|
||||
/* If the customer who redeemed this gift card no longer exists, then we need to load up a guest customer object to avoid an OutOfRangeException */
|
||||
try
|
||||
{
|
||||
$customer = \IPS\nexus\Customer::load( $val['ps_member'] );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$customer = new \IPS\nexus\Customer;
|
||||
}
|
||||
|
||||
return
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'history_giftvoucher_redeemed', FALSE, array( 'htmlsprintf' => array(
|
||||
new \IPS\nexus\Money( $val['amount'], $currency ),
|
||||
$val['code'],
|
||||
\IPS\Theme::i()->getTemplate('global', 'nexus')->userLink( \IPS\nexus\Customer::load( $val['ps_member'] ) ),
|
||||
\IPS\Theme::i()->getTemplate('global', 'nexus')->userLink( $customer ),
|
||||
new \IPS\nexus\Money( $val['newCreditAmount'], $currency )
|
||||
) ) );
|
||||
break;
|
||||
@@ -557,7 +577,7 @@ class _History extends \IPS\Helpers\Table\Db
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
$options = array( 'htmlsprintf' => array( $file, htmlentities( $val['ps_name'], ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ) );
|
||||
$options = array( 'htmlsprintf' => array( $file, htmlspecialchars( $val['ps_name'], ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ) );
|
||||
}
|
||||
return \IPS\Member::loggedIn()->language()->addToStack( 'history_download_with_purchase', FALSE, $options );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user