Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -34,7 +34,7 @@ class _comments extends \IPS\Content\Api\CommentController
|
||||
*
|
||||
* @note For requests using an OAuth Access Token for a particular member, only comments the authorized user can view will be included
|
||||
* @apiparam string categories Comma-delimited list of category IDs
|
||||
* @apiparam string authors Comma-delimited list of member IDs - if provided, only topics started by those members are returned
|
||||
* @apiparam string authors Comma-delimited list of member IDs - if provided, only comments started by those members are returned
|
||||
* @apiparam int locked If 1, only comments from events which are locked are returned, if 0 only unlocked
|
||||
* @apiparam int hidden If 1, only comments which are hidden are returned, if 0 only not hidden
|
||||
* @apiparam int featured If 1, only comments from events which are featured are returned, if 0 only not featured
|
||||
@@ -154,7 +154,7 @@ class _comments extends \IPS\Content\Api\CommentController
|
||||
* @apiparam int author The ID number of the member making the comment (0 for guest). Ignored for requests using an OAuth Access Token for a particular member.
|
||||
* @apiparam string author_name If author is 0, the guest name that should be used
|
||||
* @apiparam string content The comment content as HTML (e.g. "<p>This is a comment.</p>"). Will be sanatized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type.
|
||||
* @apiparam int hidden 1/0 indicating if the topic should be hidden
|
||||
* @apiparam int hidden 1/0 indicating if the comment should be hidden
|
||||
* @throws 2D304/5 INVALID_ID The comment ID does not exist or the authorized user does not have permission to view it
|
||||
* @throws 1D304/6 NO_AUTHOR The author ID does not exist
|
||||
* @throws 2D304/9 NO_PERMISSION The authorized user does not have permission to edit the comment
|
||||
|
||||
@@ -54,8 +54,8 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
/* Sort by popular files */
|
||||
if( \IPS\Request::i()->sortBy == 'popular' )
|
||||
{
|
||||
\IPS\Request::i()->sortDir = \IPS\Request::i()->sortDir ?: 'ASC';
|
||||
$sortBy = 'file_rating ' . \IPS\Request::i()->sortDir . ', file_reviews';
|
||||
$sortDirection = \strtoupper( \IPS\Request::i()->sortDir ) == 'DESC' ? 'DESC' : 'ASC';
|
||||
$sortBy = 'file_rating ' . $sortDirection . ', file_reviews';
|
||||
$where = array( array( 'file_rating>?', 0 ) );
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
* Upload a file
|
||||
*
|
||||
* @note For requests using an OAuth Access Token for a particular member, any parameters the user doesn't have permission to use are ignored (for example, locked will only be honoured if the authenticated user has permission to lock files).
|
||||
* @reqapiparam int category The ID number of the calendar the file should be created in
|
||||
* @reqapiparam int category The ID number of the category the file should be created in
|
||||
* @reqapiparam int author The ID number of the member creating the file (0 for guest). Required for requests made using an API Key or the Client Credentials Grant Type. For requests using an OAuth Access Token for a particular member, that member will always be the author
|
||||
* @reqapiparam string title The file name
|
||||
* @reqapiparam string description The description as HTML (e.g. "<p>This is an file.</p>"). Will be sanatized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type.
|
||||
@@ -311,7 +311,7 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
* Edit a file
|
||||
*
|
||||
* @note For requests using an OAuth Access Token for a particular member, any parameters the user doesn't have permission to use are ignored (for example, locked will only be honoured if the authenticated user has permission to lock records).
|
||||
* @apiparam int category The ID number of the calendar the file should be created in
|
||||
* @apiparam int category The ID number of the category the file should be created in
|
||||
* @apiparam int author The ID number of the member creating the file (0 for guest). Ignored for requests using an OAuth Access Token for a particular member.
|
||||
* @apiparam string title The file name
|
||||
* @apiparam string description The description as HTML (e.g. "<p>This is an file.</p>"). Will be sanatized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type.
|
||||
@@ -657,7 +657,7 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
if ( $this->member and !$file->canEdit( $this->member ) )
|
||||
if ( $this->member and ( !$file->canEdit( $this->member ) or !$file->container()->can( 'add', $this->member ) ) )
|
||||
{
|
||||
throw new \IPS\Api\Exception( 'NO_PERMISSION', '2S303/O', 403 );
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class _reviews extends \IPS\Content\Api\CommentController
|
||||
*
|
||||
* @note For requests using an OAuth Access Token for a particular member, only reviews the authorized user can view will be included
|
||||
* @apiparam string categories Comma-delimited list of category IDs
|
||||
* @apiparam string authors Comma-delimited list of member IDs - if provided, only topics started by those members are returned
|
||||
* @apiparam string authors Comma-delimited list of member IDs - if provided, only reviews started by those members are returned
|
||||
* @apiparam int locked If 1, only reviews from events which are locked are returned, if 0 only unlocked
|
||||
* @apiparam int hidden If 1, only reviews which are hidden are returned, if 0 only not hidden
|
||||
* @apiparam int featured If 1, only reviews from events which are featured are returned, if 0 only not featured
|
||||
@@ -162,7 +162,7 @@ class _reviews extends \IPS\Content\Api\CommentController
|
||||
* @apiparam int author The ID number of the member making the review (0 for guest). Ignored for requests using an OAuth Access Token for a particular member.
|
||||
* @apiparam string author_name If author is 0, the guest name that should be used
|
||||
* @apiparam string content The review content as HTML (e.g. "<p>This is a review.</p>"). Will be sanatized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type.
|
||||
* @apiparam int hidden 1/0 indicating if the topic should be hidden
|
||||
* @apiparam int hidden 1/0 indicating if the review should be hidden
|
||||
* @apiparam int rating Star rating
|
||||
* @throws 2D305/6 INVALID_ID The review ID does not exist or the authorized user does not have permission to view it
|
||||
* @throws 1D305/7 NO_AUTHOR The author ID does not exist
|
||||
|
||||
Reference in new issue
Block a user