Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -36,21 +36,17 @@ class _purchases extends \IPS\Dispatcher\Controller
|
||||
public function execute()
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'purchases_view' );
|
||||
|
||||
if ( \IPS\Request::i()->do !== 'findHostingAccount' )
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->purchase = \IPS\nexus\Purchase::load( \IPS\Request::i()->id );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '2X195/2', 404, '' );
|
||||
}
|
||||
|
||||
|
||||
\IPS\Output::i()->title = $this->purchase->name . " (#{$this->purchase->id})";
|
||||
$this->purchase = \IPS\nexus\Purchase::load( \IPS\Request::i()->id );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '2X195/2', 404, '' );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->title = $this->purchase->name . " (#{$this->purchase->id})";
|
||||
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'purchases.css', 'nexus', 'admin' ) );
|
||||
parent::execute();
|
||||
@@ -608,21 +604,4 @@ class _purchases extends \IPS\Dispatcher\Controller
|
||||
|
||||
\IPS\Output::i()->redirect( $this->purchase->acpUrl() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Hosting Account
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function findHostingAccount()
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\nexus\Purchase::load( \IPS\Db::i()->select( 'ps_id', 'nexus_hosting_accounts', array( 'account_username=?', \IPS\Request::i()->username ) )->first() )->acpUrl() );
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'node_error', '2X195/B', 404, '' );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user