Version 4.0.13.1
This commit is contained in:
1 parent
f9e857d255
commit
c6a86f0d9b
7517 files changed
+597400
-668041
No files matched your search
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Send/Discard handler for pending support replies
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Nexus
|
||||
* @since 25 Apr 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
require_once '../../../../init.php';
|
||||
|
||||
try
|
||||
{
|
||||
$reply = \IPS\nexus\Support\Reply::load( \IPS\Request::i()->id );
|
||||
if ( \IPS\Request::i()->key !== md5( $reply->item()->email_key . $reply->date ) )
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '2X206/1', 404, '' );
|
||||
}
|
||||
|
||||
if ( $reply->type !== \IPS\nexus\Support\Reply::REPLY_PENDING )
|
||||
{
|
||||
\IPS\Output::i()->error( 'support_reply_not_pending', '1X206/2', 403, '' );
|
||||
}
|
||||
|
||||
if ( \IPS\Request::i()->send )
|
||||
{
|
||||
$reply->sendPending();
|
||||
}
|
||||
else
|
||||
{
|
||||
$reply->delete();
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->blankTemplate( \IPS\Theme::i()->getTemplate( 'support', 'nexus', 'front' )->pendingDone( \IPS\Request::i()->send ? 'support_pending_sent' : 'support_pending_discarded' ) ) );
|
||||
Reference in new issue
Block a user