Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
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() ),
@@ -33,7 +33,7 @@ class _Forum
/*
* Query arguments
*/
public function args()
public function args(): array
{
return array(
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
@@ -33,7 +33,7 @@ class _Forums
/*
* Query arguments
*/
public function args()
public function args(): array
{
return array(
'id' => TypeRegistry::id()
@@ -33,7 +33,7 @@ class _Post
/*
* Query arguments
*/
public function args()
public function args(): array
{
return array(
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
@@ -33,7 +33,7 @@ class _Topic
/*
* Query arguments
*/
public function args()
public function args(): array
{
return array(
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
@@ -64,12 +64,12 @@ class _Topic
}
catch ( \OutOfRangeException $e )
{
throw new \IPS\Api\GraphQL\SafeException( 'NO_TOPIC', '1F294/2', 400 );
throw new \IPS\Api\GraphQL\SafeException( 'NO_TOPIC', '1F294/2_graphql', 400 );
}
if( !$topic->can('read') )
{
throw new \IPS\Api\GraphQL\SafeException( 'INVALID_ID', '2F294/9', 403 );
throw new \IPS\Api\GraphQL\SafeException( 'INVALID_ID', '2F294/9_graphql', 403 );
}
return $topic;
@@ -33,7 +33,7 @@ class _Topics
/*
* Query arguments
*/
public function args()
public function args(): array
{
return array(
'forums' => TypeRegistry::listOf( TypeRegistry::int() ),
@@ -82,7 +82,7 @@ class _Topics
* @param mixed Value passed into this resolver
* @param array Arguments
* @param array Context values
* @return \IPS\forums\Topic\Post
* @return \IPS\forums\Topic
*/
public function resolve($val, $args, $context, $info)
{
@@ -27,10 +27,33 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
*/
class _TypeRegistry
{
/**
* Returns the forum instance
*
* @var \IPS\forums\api\GraphQL\Types\ForumType
*/
protected static $forum;
protected static $post;
protected static $topic;
protected static $vote;
/**
* Returns the post instance
*
* @var \IPS\forums\api\GraphQL\Types\PostType
*/
protected static $post;
/**
* Returns the topic instance
*
* @var \IPS\forums\api\GraphQL\Types\TopicType
*/
protected static $topic;
/**
* Returns the vote instance
*
* @var \IPS\forums\api\GraphQL\Types\VoteType
*/
protected static $vote;
/**
* Constructor
@@ -43,7 +66,7 @@ class _TypeRegistry
/**
* @return ForumType
*/
public static function forum()
public static function forum() : \IPS\forums\api\GraphQL\Types\ForumType
{
return self::$forum ?: (self::$forum = new \IPS\forums\api\GraphQL\Types\ForumType());
}
@@ -51,15 +74,15 @@ class _TypeRegistry
/**
* @return PostType
*/
public static function post()
{
return self::$post ?: (self::$post = new \IPS\forums\api\GraphQL\Types\PostType());
}
public static function post() : \IPS\forums\api\GraphQL\Types\PostType
{
return self::$post ?: (self::$post = new \IPS\forums\api\GraphQL\Types\PostType());
}
/**
* @return TopicType
*/
public static function topic()
public static function topic() : \IPS\forums\api\GraphQL\Types\TopicType
{
return self::$topic ?: (self::$topic = new \IPS\forums\api\GraphQL\Types\TopicType());
}
@@ -67,7 +90,7 @@ class _TypeRegistry
/**
* @return VoteType
*/
public static function vote()
public static function vote() : \IPS\forums\api\GraphQL\Types\VoteType
{
return self::$vote ?: (self::$vote = new \IPS\forums\api\GraphQL\Types\VoteType());
}
@@ -123,9 +123,6 @@ class _PostType extends \IPS\Content\Api\GraphQL\CommentType
]
);
// Duplicate fields that have different names in posts
//$defaultFields['topic'] = $defaultFields['item'];
// Remove duplicated fields
unset( $defaultFields['item'] );
+1
View File
@@ -34,6 +34,7 @@ class _topics extends \IPS\Content\Api\ItemController
*
* @note For requests using an OAuth Access Token for a particular member, only topics the authorized user can view will be included
* @apiparam string forums Comma-delimited list of forum IDs
* @apiparam string ids Comma-delimited list of topic IDs
* @apiparam string authors Comma-delimited list of member IDs - if provided, only topics started by those members are returned
* @apiparam int hasBestAnswer If 1, only topics with a best answer are returned, if 0 only without
* @apiparam int hasPoll If 1, only topics with a poll are returned, if 0 only without
+11 -12
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="forums">
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -272,7 +272,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -351,7 +351,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050">/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -410,7 +410,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050">/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -460,7 +460,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="forums" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.archiveRules.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
<file javascript_app="forums" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.archiveRules.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -525,7 +525,7 @@
});
}(jQuery, _));
]]></file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100">/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -557,7 +557,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -697,7 +697,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100">/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -725,7 +725,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.solved.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.solved.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -742,7 +742,7 @@
this.on( 'click', '[data-action="mailSolvedReminders"]', this.mailSolvedReminders );
},
/**
/**
* Toggle on email reminders to come back and mark replies as the solution
*
* @param {event} e Event object
@@ -763,7 +763,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100">/**
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -834,7 +834,6 @@ controllers</order>
<order app="global" path="/dev/js//library/">underscore
jquery
mustache
jstz
IntersectionObserver
Debug.js
app.js</order>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="forums" version="107601">
<app key="forums" version="107643">
<word key="__app_forums" js="0">Forums</word>
<word key="frontnavigation_forums" js="0">Forums</word>
<word key="__indefart_post" js="0">a post in a topic</word>
File diff suppressed because it is too large. Load diff
+15 -1
View File
@@ -495,5 +495,19 @@
"107504": "4.7.5",
"107505": "4.7.5",
"107600": "4.7.6 Beta 1",
"107601": "4.7.6"
"107601": "4.7.6",
"107602": "4.7.6",
"107620": "4.7.7 Beta 1",
"107621": "4.7.7 Beta 2",
"107622": "4.7.7 Beta 2",
"107623": "4.7.7 Beta 3",
"107624": "4.7.7 Beta 4",
"107625": "4.7.7",
"107626": "4.7.7",
"107627": "4.7.7",
"107628": "4.7.7",
"107640": "4.7.8 Beta 1",
"107641": "4.7.8 Beta 2",
"107642": "4.7.8 Beta 3",
"107643": "4.7.8"
}
@@ -114,6 +114,7 @@ class _solved extends \IPS\Dispatcher\Controller
$chart->enableHourly = FALSE;
$chart->groupBy = 'value_1';
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('forums_solved_stats_time');
$chart->where[] = array( "type=?", 'solved' );
foreach( $validForumIds = $this->getValidForumIds() as $forumId => $forum )
{
@@ -140,6 +141,7 @@ class _solved extends \IPS\Dispatcher\Controller
$chart->enableHourly = FALSE;
$chart->groupBy = 'value_1';
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('forums_solved_stats_percentage');
$chart->where[] = array( "type=?", 'solved' );
foreach( $validForumIds = $this->getValidForumIds() as $forumId => $forum )
{
@@ -266,7 +266,25 @@ class _topic extends \IPS\Content\Controller
}
}
$pagination = ( $topic->commentPageCount() > 1 ) ? $topic->commentPagination( array( 'sortby' ) ) : NULL;
}
}
if ( isset( \IPS\Request::i()->ltqid ) and $liveTopic = $topic->getLiveTopic() )
{
try
{
$question = \IPS\cloud\LiveTopic\Question::load( \IPS\Request::i()->ltqid );
if ( is_string( $where ) )
{
$_where[] = $where;
$where = $_where;
}
$where[] = array( 'pid=? OR pid IN(?)', $question->post_id, \IPS\Db::i()->select( 'post_id', 'cloud_livetopics_answer', [ 'question_id=?', $question->id ] ) );
}
catch( \OutOfRangeException ) { }
}
$comments = $topic->comments( NULL, $offset, $order, $orderDirection, NULL, NULL, NULL, $where, FALSE, ( isset( \IPS\Request::i()->showDeleted ) ) );
$current = current( $comments );
reset( $comments );
@@ -341,6 +359,16 @@ class _topic extends \IPS\Content\Controller
\IPS\Output::i()->sidebar['contextual'] = \IPS\Theme::i()->getTemplate( 'topics' )->activity( $topic, 'sidebar' );
}
if ( $liveTopic = $topic->getLiveTopic() )
{
if ( ! isset( \IPS\Output::i()->sidebar['contextual'] ) )
{
\IPS\Output::i()->sidebar['contextual'] = '';
}
\IPS\Output::i()->sidebar['contextual'] .= \IPS\Theme::i()->getTemplate( 'livetopics', 'cloud' )->liveTopicSidebar( $liveTopic );
}
/* Add Json-LD */
$isQuestion = ( $topic->isQuestion() or $topic->isSolved() );
@@ -0,0 +1,23 @@
{
"id": 107602,
"name": "4.7.6",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107620,
"name": "4.7.7 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": true,
"themeSettings": false,
"javascript": true,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": true,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,14 @@
{
"files": {
"added": [],
"edited": [],
"removed": []
},
"orders": {
"added": [],
"edited": [
"global\/\/dev\/js\/\/library\/"
],
"removed": []
}
}
@@ -0,0 +1,19 @@
{
"html": {
"added": [],
"edited": [
"front\/widgets\/pollFormWidget"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,23 @@
{
"id": 107621,
"name": "4.7.7 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107622,
"name": "4.7.7 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107623,
"name": "4.7.7 Beta 3",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107624,
"name": "4.7.7 Beta 4",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107625,
"name": "4.7.7",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107626,
"name": "4.7.7",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107627,
"name": "4.7.7",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107628,
"name": "4.7.7",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107640,
"name": "4.7.8 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": true,
"themeSettings": false,
"javascript": true,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,14 @@
{
"files": {
"added": [],
"edited": [
"forums\/front\/controllers\/topic\/ips.topic.solved.js"
],
"removed": []
},
"orders": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,31 @@
{
"html": {
"added": [],
"edited": [
"front\/forums\/clubForums",
"front\/forums\/forumDisplay",
"front\/forums\/topicHover",
"front\/index\/forumGridItem",
"front\/index\/index",
"front\/topics\/topic",
"front\/widgets\/forumStatistics",
"front\/widgets\/hotTopics",
"front\/widgets\/postFeed",
"front\/widgets\/topicFeed"
],
"removed": []
},
"css": {
"added": [],
"edited": [
"front\/forums_responsive.css",
"front\/forums.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,23 @@
{
"id": 107641,
"name": "4.7.8 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107642,
"name": "4.7.8 Beta 3",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"id": 107643,
"name": "4.7.8",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
+14 -6
View File
@@ -347,7 +347,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
* We also cannot look for future entries since this code is used in older upgrades, but we can look for the date instead.
*/
$select = \IPS\Db::i()->select( '*', 'forums_topics', array( "forums_topics.forum_id=? AND forums_topics.approved=1 AND forums_topics.state != ? AND forums_topics.last_post<=?", $this->id, 'link', time() ), 'forums_topics.last_post DESC', 1, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
$select = \IPS\Db::i()->select( '*', 'forums_topics', array( "forums_topics.forum_id=? AND forums_topics.approved=1 AND forums_topics.state != ? AND forums_topics.last_post<=? AND forums_topics.publish_date <=?", $this->id, 'link', time(), time() ), 'forums_topics.last_post DESC', 1, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
$topic = \IPS\forums\Topic::constructFromData( $select );
@@ -1205,7 +1205,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
if( isset( $values[ $k ] ) )
{
/* If were disabling bw_enable_answers_moderator for discussion forums, we need to make sure bw_enable_answers_member is also disabled */
if ( $k == 'bw_enable_answers_moderator' AND !$values[ $k ] )
if ( $values['forum_type'] == 'normal' AND $k == 'bw_enable_answers_moderator' AND !$values[ $k ] )
{
$values['forums_bitoptions']['bw_enable_answers_moderator'] = FALSE;
$values['forums_bitoptions']['bw_enable_answers_member'] = FALSE;
@@ -1569,7 +1569,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
if ( $moderator['perms'] === '*' OR
(
!empty( $json['can_read_all_topics'] ) AND ( isset( $json['forums'] ) AND ( $json['forums'] === -1 OR \in_array( $this->_id, $json['forums'] ) ) )
!empty( $json['can_read_all_topics'] ) AND ( !empty( $json['forums'] ) AND ( $json['forums'] === -1 OR \in_array( $this->_id, $json['forums'] ) ) )
) )
{
if( $moderator['type'] === 'g' )
@@ -1885,9 +1885,17 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
$return['permissions'] = $this->permissions();
}
if ( \IPS\IPS::classUsesTrait( \get_called_class(), 'IPS\Content\ClubContainer' ) AND $this->club() )
if ( \IPS\IPS::classUsesTrait( \get_called_class(), 'IPS\Content\ClubContainer' ) )
{
$return['public'] = ( $this->isPublic() ) ? 1 : 0;
if( $this->club() )
{
$return['public'] = ( $this->isPublic() ) ? 1 : 0;
$return['club'] = $this->club()->apiOutput( $authorizedMember );
}
else
{
$return['club'] = 0;
}
}
return $return;
@@ -1947,7 +1955,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
if( $club->type == 'closed' )
{
$form->add( new \IPS\Helpers\Form\YesNo( 'club_node_public', $this->id ? $this->isPublic() : FALSE ) );
$form->add( new \IPS\Helpers\Form\Radio( 'club_node_public', $this->id ? $this->isPublic() : 0, TRUE, array( 'options' => array( '0' => 'club_node_public_no', '1' => 'club_node_public_view', '2' => 'club_node_public_participate' ) ) ) );
}
}
@@ -0,0 +1,52 @@
<?php
/**
* @brief LiveTopic Trait
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 17 Nov 2022
*/
namespace IPS\forums\Topic;
/* 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;
}
/**
* LiveTopic Trait
*
* This carries specific functionality for LiveTopic and forum topic interactions
* @todo consider moving into cloud but would be tricky given you cannot hook into traits and methods will need to be exposed to normal forum logic.
*/
trait LiveTopic
{
/**
* Return the live topic, or null if one doesn't exist / customer not on cloud
*
* @return \IPS\cloud\LiveTopic|null
*/
public function getLiveTopic(): ?\IPS\cloud\LiveTopic
{
if ( \IPS\Application::appIsEnabled( 'cloud' ) )
{
try
{
return \IPS\cloud\LiveTopic::load( $this->tid, 'topic_topic_id' );
}
catch ( \OutOfRangeException )
{
return NULL;
}
}
return NULL;
}
}
@@ -120,11 +120,6 @@ class _Post extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \I
*/
public static $tabParameter = NULL; /* We do not want ?tab=comments appended to links in from findComment links */
/**
* @brief Whether to track the sentiment scores in cloud_sentiment_scores for this content
*/
public $trackSentimentScore = true;
/**
* Create comment
*
+10 -21
View File
@@ -37,7 +37,7 @@ class _Topic extends \IPS\Content\Item implements
\IPS\Content\Anonymous,
\IPS\Content\FuturePublishing
{
use \IPS\Content\Reactable, \IPS\Content\Reportable, \IPS\Content\Statistics, \IPS\Content\Solvable { toggleSolveComment as protected _toggleSolveComment; }
use \IPS\forums\Topic\LiveTopic, \IPS\Content\Reactable, \IPS\Content\Reportable, \IPS\Content\Statistics, \IPS\Content\Solvable { toggleSolveComment as protected _toggleSolveComment; }
/**
* @brief Not archived
@@ -177,11 +177,6 @@ class _Topic extends \IPS\Content\Item implements
* @brief Setting name for show_meta
*/
public static $showMetaSettingKey = 'forums_topics_show_meta';
/**
* @brief Whether to track the sentiment scores in cloud_sentiment_scores for this content
*/
public $trackSentimentScore = true;
/**
* Callback from \IPS\Http\Url\Inernal::correctUrlFromVerifyClass()
@@ -565,26 +560,20 @@ class _Topic extends \IPS\Content\Item implements
if ( static::modPermission( 'lock', NULL, $container ) )
{
/* Poll always needs to go on the end */
$poll = NULL;
if ( isset( $formElements['poll'] ) )
{
$poll = $formElements['poll'];
unset( $formElements['poll'] );
}
/* Add lock/unlock options */
if ( static::modPermission( 'unlock', NULL, $container ) )
{
$formElements['topic_open_time'] = new \IPS\Helpers\Form\Date( 'topic_open_time', ( $item and $item->topic_open_time ) ? \IPS\DateTime::ts( $item->topic_open_time ) : NULL, FALSE, array( 'time' => TRUE ) );
}
$formElements['topic_close_time'] = new \IPS\Helpers\Form\Date( 'topic_close_time', ( $item and $item->topic_close_time ) ? \IPS\DateTime::ts( $item->topic_close_time ) : NULL, FALSE, array( 'time' => TRUE ) );
/* Poll always needs to go on the end */
if ( $poll )
{
$formElements['poll'] = $poll;
}
}
/* Poll always needs to go on the end */
if ( isset( $formElements['poll'] ) )
{
$poll = $formElements['poll'];
unset( $formElements['poll'] );
$formElements['poll'] = $poll;
}
return $formElements;
@@ -1118,7 +1107,7 @@ class _Topic extends \IPS\Content\Item implements
\IPS\Db::i()->delete( 'forums_answer_ratings', "topic IN(" . implode( ',', $itemTids ) . ")" );
/* And then update the topic with the new question rating count */
\IPS\Db::i()->update( 'forums_topics', array( 'question_rating' =>
\IPS\Db::i()->update( 'forums_topics', array( 'question_rating' =>
\IPS\Db::i()->select( 'SUM(rating)', 'forums_question_ratings', array( 'topic=?', $this->tid ) )
), array( 'tid=?', $this->tid ) );
@@ -47,7 +47,7 @@ class _solvedNotifications extends \IPS\Task
$where = [
[ \IPS\Db::i()->in( 'approved', array( -2, -3 ), TRUE ) ],
[ 'posts > 1 and start_date > ? and start_date < ? and solved_reminder_sent=0 and topic_answered_pid=0', ( time() - ( 365 * 86400) ), ( time() - ( (int) \IPS\Settings::i()->forums_solved_topic_reengage * 86400 ) ) ],
[ \IPS\Db::i()->in( 'forum_id', iterator_to_array( \IPS\Db::i()->select( 'id', 'forums_forums', '(' . \IPS\Db::i()->bitwiseWhere( \IPS\forums\Forum::$bitOptions['forums_bitoptions'], 'bw_enable_answers_member' ) . ')' ) ) ) ],
[ \IPS\Db::i()->in( 'forum_id', iterator_to_array( \IPS\Db::i()->select( 'id', 'forums_forums', '(' . \IPS\Db::i()->bitwiseWhere( \IPS\forums\Forum::$bitOptions['forums_bitoptions'], 'bw_enable_answers_member' ) . ') AND (' . \IPS\Db::i()->bitwiseWhere( \IPS\forums\Forum::$bitOptions['forums_bitoptions'], 'bw_enable_answers_moderator' ) . ')' ) ) ) ],
[ 'starter_id NOT IN (?)', \IPS\Db::i()->select( 'member_id', 'core_members', \IPS\Db::i()->bitwiseWhere( \IPS\Member::$bitOptions['members_bitoptions'], 'no_solved_reenage' ) ) ]
];
@@ -94,6 +94,12 @@ class _solvedNotifications extends \IPS\Task
{
$topic = \IPS\forums\Topic::constructFromData( $row );
/* Don't send for converted live topics */
if ( $topic->getLiveTopic() )
{
continue;
}
if ( $topic->canView( $topic->author() ) )
{
$replies = $topic->comments( 4, 0, 'date', 'asc' );