Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -38,7 +38,7 @@ class _CreateTopic extends \IPS\Content\Api\GraphQL\ItemMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'forumID' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
@@ -64,7 +64,7 @@ class _CreateTopic extends \IPS\Content\Api\GraphQL\ItemMutator
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return \IPS\forums\Forum
|
||||
* @return \IPS\forums\Topic
|
||||
*/
|
||||
public function resolve($val, $args, $context, $info)
|
||||
{
|
||||
@@ -75,23 +75,23 @@ class _CreateTopic extends \IPS\Content\Api\GraphQL\ItemMutator
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_FORUM', '1F294/2', 400 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_FORUM', '1F294/2_graphl', 400 );
|
||||
}
|
||||
|
||||
/* Check permission */
|
||||
if ( !$forum->can( 'add', \IPS\Member::loggedIn() ) )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_PERMISSION', '2F294/9', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_PERMISSION', '2F294/9_graphl', 403 );
|
||||
}
|
||||
|
||||
/* Check we have a title and a post */
|
||||
if ( !$args['title'] )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_TITLE', '1F294/5', 400 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_TITLE', '1F294/5_graphl', 400 );
|
||||
}
|
||||
if ( !$args['content'] )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F294/4', 400 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F294/4_graphl', 400 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class _MarkForumRead extends \IPS\Node\Api\GraphQL\NodeMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
|
||||
|
||||
@@ -33,7 +33,7 @@ class _MarkTopicRead extends \IPS\Content\Api\GraphQL\ItemMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
|
||||
|
||||
@@ -33,7 +33,7 @@ class _MarkTopicSolved extends \IPS\Node\Api\GraphQL\NodeMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
|
||||
@@ -38,7 +38,7 @@ class _PostReaction extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'postID' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
@@ -61,7 +61,7 @@ class _PostReaction extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return \IPS\forums\Forum
|
||||
* @return \IPS\forums\Topic\Post
|
||||
*/
|
||||
public function resolve($val, $args, $context, $info)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ class _PostReaction extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/1', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/1_graphl', 403 );
|
||||
}
|
||||
|
||||
/* Do it */
|
||||
|
||||
@@ -38,7 +38,7 @@ class _ReplyTopic extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'topicID' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
@@ -73,19 +73,19 @@ class _ReplyTopic extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_TOPIC', '1F295/1', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_TOPIC', '1F295/1_graphl', 403 );
|
||||
}
|
||||
|
||||
/* Get author */
|
||||
if ( !$topic->canComment( \IPS\Member::loggedIn() ) )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_PERMISSION', '2F294/A', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_PERMISSION', '2F294/A_graphl', 403 );
|
||||
}
|
||||
|
||||
/* Check we have a post */
|
||||
if ( !$args['content'] )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/3', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/3_graphl', 403 );
|
||||
}
|
||||
|
||||
$originalPost = NULL;
|
||||
|
||||
@@ -38,7 +38,7 @@ class _ReportPost extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
@@ -75,7 +75,7 @@ class _ReportPost extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/1', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/1_graphl', 403 );
|
||||
}
|
||||
|
||||
/* Do it */
|
||||
|
||||
@@ -38,7 +38,7 @@ class _RevokePostReport extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
@@ -71,7 +71,7 @@ class _RevokePostReport extends \IPS\Content\Api\GraphQL\CommentMutator
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/1', 403 );
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1F295/1_graphl', 403 );
|
||||
}
|
||||
|
||||
/* Do it */
|
||||
|
||||
@@ -33,7 +33,7 @@ class _SetBestAnswer
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
|
||||
|
||||
@@ -33,7 +33,7 @@ class _VoteAnswer
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
|
||||
@@ -39,7 +39,7 @@ class _VoteInPoll extends \IPS\Poll\Api\GraphQL\PollMutator
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'itemID' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
|
||||
@@ -33,7 +33,7 @@ class _VoteQuestion
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
|
||||
Reference in new issue
Block a user