Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\nexus\api;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -102,7 +102,7 @@ class _supportrequests extends \IPS\Content\Api\ItemController
|
||||
|
||||
/* Are we a staff member? */
|
||||
$bypassPerms = FALSE;
|
||||
if ( $this->member and $this->member->isAdmin() and count( \IPS\nexus\Support\Department::departmentsWithPermission( $this->member ) ) )
|
||||
if ( $this->member and $this->member->isAdmin() and \count( \IPS\nexus\Support\Department::departmentsWithPermission( $this->member ) ) )
|
||||
{
|
||||
$where[] = array( \IPS\Db::i()->in( 'r_department', array_keys( iterator_to_array( \IPS\nexus\Support\Department::departmentsWithPermission( $this->member ) ) ) ) );
|
||||
$bypassPerms = TRUE;
|
||||
@@ -195,7 +195,7 @@ class _supportrequests extends \IPS\Content\Api\ItemController
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ( $key === 'severity' and ( !$this->member->cm_no_sev or !in_array( $object, \IPS\nexus\Support\Department::load( \IPS\Request::i()->department )->availableSeverities() ) ) )
|
||||
if ( $key === 'severity' and ( !$this->member->cm_no_sev or !\in_array( $object, \IPS\nexus\Support\Department::load( \IPS\Request::i()->department )->availableSeverities() ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -331,6 +331,7 @@ class _supportrequests extends \IPS\Content\Api\ItemController
|
||||
if ( !$this->member and isset( \IPS\Request::i()->email ) )
|
||||
{
|
||||
$item->email = \IPS\Request::i()->email;
|
||||
$item->save();
|
||||
}
|
||||
|
||||
/* Do it */
|
||||
@@ -349,6 +350,7 @@ class _supportrequests extends \IPS\Content\Api\ItemController
|
||||
* @apiparam int purchase Associated purchase ID number. Ignored for requests using an OAuth Access Token for a particular member (users cannot change associated purchase of request after its created)
|
||||
* @apiparam string lkey License key of associated purchase ID number. (Will be ignored if "purchase" is provided). Ignored for requests using an OAuth Access Token for a particular member (users cannot change associated purchase of request after its created)
|
||||
* @apiparam int staff Assigned staff ID number. Ignored for requests using an OAuth Access Token for a particular member
|
||||
* @param int $id ID Number
|
||||
* @throws 2X313/7 INVALID_ID The topic ID does not exist or the authorized user does not have permission to view it
|
||||
* @return \IPS\nexus\Support\Request
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user