Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Support Index
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 08 Apr 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -46,7 +46,7 @@ class _home extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
$table = new \IPS\Helpers\Table\Content( 'IPS\nexus\Support\Request', \IPS\Http\Url::internal( 'app=nexus&module=support&controller=home', 'support' ) );
|
||||
$table = new \IPS\Helpers\Table\Content( 'IPS\nexus\Support\Request', \IPS\Http\Url::internal( 'app=nexus&module=support&controller=home', 'front', 'support' ) );
|
||||
$table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'support' ), 'tableRows' );
|
||||
$table->classes[] = 'ipsDataList_large';
|
||||
$table->showFilters = FALSE;
|
||||
@@ -68,15 +68,15 @@ class _home extends \IPS\Dispatcher\Controller
|
||||
if ( count( $accounts ) and !isset( \IPS\Request::i()->account ) )
|
||||
{
|
||||
$options = array();
|
||||
$options[ \IPS\nexus\Customer::loggedIn()->member_id ] = \IPS\nexus\Customer::loggedIn()->language()->addToStack( 'my_account', FALSE, array( 'sprintf' => array( \IPS\nexus\Customer::loggedIn()->cm_name ) ) );
|
||||
foreach ( $accounts as $contact )
|
||||
{
|
||||
$options[ $contact->main_id->member_id ] = $contact->main_id->cm_name;
|
||||
}
|
||||
$options[ \IPS\nexus\Customer::loggedIn()->member_id ] = \IPS\nexus\Customer::loggedIn()->language()->addToStack( 'my_account', FALSE, array( 'sprintf' => array( \IPS\nexus\Customer::loggedIn()->cm_name ) ) );
|
||||
|
||||
$form = new \IPS\Helpers\Form( 'account', 'continue' );
|
||||
$form->class = 'ipsForm_vertical';
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'support_account', NULL, TRUE, array( 'options' => $options, 'parse' => 'none' ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'support_account', \IPS\nexus\Customer::loggedIn()->member_id, TRUE, array( 'options' => $options, 'parse' => 'none' ) ) );
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=nexus&module=support&controller=home&do=create&account={$values['support_account']}", 'front', 'support_create' ) );
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Legacy Redirector
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Commerce
|
||||
* @since 07 Sep 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\nexus\modules\front\support;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy Redirector
|
||||
*/
|
||||
class _redirect extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
/**
|
||||
* Redirect
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
$url = \IPS\Http\Url::internal( "app=core&module=system&controller=redirect" )->setQueryString( array(
|
||||
'url' => \IPS\Request::i()->url,
|
||||
'resource' => ( \IPS\Request::i()->resource ) ? 1 : NULL,
|
||||
'key' => hash_hmac( "sha256", \IPS\Request::i()->url, \IPS\Settings::i()->site_secret_key ),
|
||||
) );
|
||||
|
||||
\IPS\Output::i()->redirect( $url );
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Support Request View
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 09 Apr 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -45,6 +45,11 @@ class _view extends \IPS\Content\Controller
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The current support request (instance of \IPS\nexus\Support\Request)
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* View Item
|
||||
*
|
||||
@@ -62,7 +67,9 @@ class _view extends \IPS\Content\Controller
|
||||
if ( isset( \IPS\Request::i()->setStatus ) and !empty( $allowedStatuses ) and in_array( \IPS\Request::i()->setStatus, array_keys( $allowedStatuses ) ) )
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
$this->request->status = \IPS\nexus\Support\Status::load( \IPS\Request::i()->setStatus );
|
||||
$newStatus = \IPS\nexus\Support\Status::load( \IPS\Request::i()->setStatus );
|
||||
$this->request->log( 'status', $this->request->status, $newStatus );
|
||||
$this->request->status = $newStatus;
|
||||
$this->request->save();
|
||||
\IPS\Output::i()->redirect( $this->request->url() );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user