Version 5.0.0 release
This commit is contained in:
1 parent
90e8c7e903
commit
a3a4a9ccbd
651 files changed
+7275
-9481
No files matched your search
@@ -1 +0,0 @@
|
||||
[]
|
||||
@@ -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="5000043" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000100"><![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="5000043" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -340,7 +340,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="5000043" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -397,7 +397,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="5000043" javascript_position="1000100">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -447,7 +447,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="5000043" 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="5000049" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -512,7 +512,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="5000043" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -534,7 +534,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="5000043" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -674,7 +674,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="5000043" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -703,7 +703,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="5000043" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.solved.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -741,7 +741,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="5000043" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="5000049" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="forums" version="5000043">
|
||||
<app key="forums" version="5000049">
|
||||
<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>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
{{if $forum->description}}
|
||||
{template="richText" group="global" app="core" location="global" params="$forum->description, array('ipsPageHeader__desc')"}
|
||||
{{endif}}
|
||||
{{if \IPS\Application::appIsEnabled('cloud') AND \IPS\cloud\Application::featureIsEnabled( 'realtime' )}}
|
||||
{{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}}
|
||||
<div data-controller='cloud.front.realtime.whosViewing' data-location='{expression="\IPS\cloud\Realtime::i()->getLocationHash()"}'></div>
|
||||
{{endif}}
|
||||
</div>
|
||||
@@ -122,7 +122,7 @@
|
||||
</div>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
<div data-controller='forums.front.forum.forumPage,cloud.front.realtime.viewingProvider'>
|
||||
<div data-controller="forums.front.forum.forumPage{{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}},cloud.front.realtime.viewingProvider{{endif}}">
|
||||
{template="forumButtons" group="forums" params="$forum"}
|
||||
{$table|raw}
|
||||
</div>
|
||||
@@ -532,7 +532,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li data-ips-hook="topicRow" class="ipsData__item {{if $row->groupsPosted}}ipsData__item--highlighted{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}} {{if $row->isFutureDate()}}ipsModerated--future{{endif}} {$row->ui( 'css' )} {{if $row->isAssignedToMember()}}ipsData__item--assigned{{endif}}" data-rowID='{$row->$idField}' data-location='{{if isset($row->locationHash)}}{$row->locationHash}{{endif}}' data-controller='cloud.front.realtime.forumsTopicRow' {{if $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}} {$row->ui( 'dataAttributes' )}>
|
||||
<li data-ips-hook="topicRow" class="ipsData__item {{if $row->groupsPosted}}ipsData__item--highlighted{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}} {{if $row->isFutureDate()}}ipsModerated--future{{endif}} {$row->ui( 'css' )} {{if $row->isAssignedToMember()}}ipsData__item--assigned{{endif}}" data-rowID='{$row->$idField}' data-location='{{if isset($row->locationHash)}}{$row->locationHash}{{endif}}' {{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}}data-controller='cloud.front.realtime.forumsTopicRow'{{endif}} {{if $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}} {$row->ui( 'dataAttributes' )}>
|
||||
{{if $row->mapped('title') or $row->mapped('title') == 0}}<a href='{$row->url( "getPrefComment" )}' class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{$row->mapped('title')}</span></a>{{endif}}
|
||||
{{if member.member_id and $row->unread()}}
|
||||
<a href='{$row->url( "getNewComment" )}' class="ipsData__icon" aria-label='{lang="first_unread_post"}' data-ipsTooltip data-ips-hook="unreadIcon">
|
||||
@@ -695,7 +695,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li data-ips-hook="topicRow" data-controller="cloud.front.realtime.forumsTopicRow" class="ipsData__item ipsData__item--snippet {{if $row->groupsPosted}}ipsData__item--highlighted{{endif}}{{if $row->isAssignedToMember()}} ipsData__item--assigned{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated--alternate{{endif}} {$row->ui( 'css' )}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}} {{if $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}} {$row->ui( 'dataAttributes' )}>
|
||||
<li data-ips-hook="topicRow" {{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}}data-controller="cloud.front.realtime.forumsTopicRow"{{endif}} class="ipsData__item ipsData__item--snippet {{if $row->groupsPosted}}ipsData__item--highlighted{{endif}}{{if member.modPermissions() and $row->isAssignedToMember()}} ipsData__item--assigned{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated--alternate{{endif}} {$row->ui( 'css' )}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}} {{if $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}} {$row->ui( 'dataAttributes' )}>
|
||||
<a href='{$row->url( "getPrefComment" )}' class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{$row->mapped('title')}</span></a>
|
||||
<div class='ipsData__icon'>
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'fluid'"}
|
||||
@@ -713,7 +713,9 @@
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
<div data-ips-hook="badges" class="ipsBadges">
|
||||
{template="assignmentBadge" app="core" group="global" params="$row, ''"}
|
||||
{{if member.modPermissions()}}
|
||||
{template="assignmentBadge" app="core" group="global" params="$row, ''"}
|
||||
{{endif}}
|
||||
{{if $row->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}
|
||||
{{endif}}
|
||||
@@ -1617,7 +1619,7 @@
|
||||
{{$idField = $row::$databaseColumnId;}}
|
||||
{{if $row->mapped('moved_to')}}
|
||||
{{if $movedTo = $row->movedTo() AND $movedTo->container()->can('view')}}
|
||||
<li class="ipsData__item" data-controller="cloud.front.realtime.forumsTopicRow">
|
||||
<li class="ipsData__item" {{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}}data-controller="cloud.front.realtime.forumsTopicRow"{{endif}}>
|
||||
<a href='{$movedTo->url( "getPrefComment" )}' class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{$row->mapped('title')}</span></a>
|
||||
<div class='ipsData__icon ipsData__icon--indicator'>
|
||||
<i class="fa-solid fa-arrow-left"></i>
|
||||
@@ -1718,7 +1720,7 @@
|
||||
<div class="ipsData__extra">
|
||||
<ul data-ips-hook="stats" class='ipsData__stats'>
|
||||
{{foreach $row->stats(FALSE) as $k => $v}}
|
||||
<li {{if $k == 'num_views'}}class='ipsData__stats-soft i-color_soft'{{elseif \in_array( $k, $row->hotStats )}}class="ipsData__stats-hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}>
|
||||
<li {{if $k == 'num_views'}}class='ipsData__stats-soft i-color_soft'{{elseif \in_array( $k, $row->hotStats )}}class="ipsData__stats-hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}} data-statType='{$k}' data-v="{$v}">
|
||||
<span class='ipsData__stats-icon' data-stat-value="{number='$v' format='short'}" aria-hidden="true" data-ipstooltip title='{number="$v" format="short"} {lang="{$k}" pluralize="$v" format="short"}'></span>
|
||||
<span class='ipsData__stats-label'>{number="$v" format="short"} {lang="{$k}" pluralize="$v" format="short"}</span>
|
||||
{{if ( $k == 'forums_comments' OR $k == 'answers_no_number' ) && \IPS\forums\Topic::modPermission( 'unhide', NULL, $row->container() ) AND $unapprovedComments = $row->mapped('unapproved_comments')}}
|
||||
@@ -1809,7 +1811,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li data-ips-hook="row" data-controller="cloud.front.realtime.forumsTopicRow" class="ipsData__item ipsData__item--snippet {{if $row->groupsPosted}}ipsData__item--highlighted{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated--alternate{{endif}}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}}' {{if $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}}>
|
||||
<li data-ips-hook="row" {{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}}data-controller="cloud.front.realtime.forumsTopicRow"{{endif}} class="ipsData__item ipsData__item--snippet {{if $row->groupsPosted}}ipsData__item--highlighted{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated--alternate{{endif}}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}}' {{if $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}}>
|
||||
<a href='{$row->url( "getPrefComment" )}' class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{$row->mapped('title')}</span></a>
|
||||
<div class='ipsData__icon'>
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'fluid'"}
|
||||
@@ -3129,7 +3131,7 @@ data-first-page="{{if isset( request.page ) and request.page > 1}}false{{else}}t
|
||||
{{endif}}
|
||||
|
||||
{{if ( $topic->commentForm() || $topic->locked() || \IPS\Member::loggedIn()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings'] || !\IPS\Member::loggedIn()->checkPostsPerDay()) && !$topic->isArchived()}}
|
||||
<div id='replyForm' data-ips-hook="topicReplyForm" data-role='replyArea' class='cTopicPostArea ipsBox ipsPull {{if !$topic->canComment()}}cTopicPostArea_noSize{{endif}}' {{if \IPS\Application::appIsEnabled('cloud') AND \IPS\cloud\Application::featureIsEnabled( 'realtime' )}}data-controller='cloud.front.realtime.forumsReplyArea,cloud.front.realtime.whosTyping'{{endif}}>
|
||||
<div id='replyForm' data-ips-hook="topicReplyForm" data-role='replyArea' class='cTopicPostArea ipsBox ipsPull {{if !$topic->canComment()}}cTopicPostArea_noSize{{endif}}' {{if \IPS\Platform\Bridge::i()->featureIsEnabled( 'realtime' )}}data-controller='cloud.front.realtime.forumsReplyArea,cloud.front.realtime.whosTyping'{{endif}}>
|
||||
{{if $topic->commentForm()}}
|
||||
{{if $topic->locked()}}
|
||||
<p class='ipsComposeArea_warning'><i class='fa-solid fa-circle-info'></i> {lang="topic_locked_can_comment"}</p>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -309,5 +309,11 @@
|
||||
"5000040": "5.0.0 Beta 9.1",
|
||||
"5000041": "5.0.0 Beta 10",
|
||||
"5000042": "5.0.0 Beta 11",
|
||||
"5000043": "5.0.0 Beta 11.1"
|
||||
"5000043": "5.0.0 Beta 11.1",
|
||||
"5000044": "5.0.0 Beta 12",
|
||||
"5000045": "5.0.0 Beta 13",
|
||||
"5000046": "5.0.0 Beta 14",
|
||||
"5000047": "5.0.0 Beta 14.1",
|
||||
"5000048": "5.0.0 Beta 14.2",
|
||||
"5000049": "5.0.0"
|
||||
}
|
||||
Whitespace-only changes.
@@ -583,7 +583,7 @@ class settings extends Controller
|
||||
|
||||
if ( SettingsClass::i()->archive_on )
|
||||
{
|
||||
$whereClause = Db::i()->compileWhereClause( Application::load('forums')->archiveWhere( Db::i()->select( '*', 'forums_archive_rules' ) ) );
|
||||
$whereClause = Db::i()->compileWhereClause( Application::load('forums')->archiveWhere( iterator_to_array( Db::i()->select( '*', 'forums_archive_rules' ) ) ) );
|
||||
$_whereClause = array( 'topic_archive_status=? AND !( ' . $whereClause['clause'] . ')' );
|
||||
$_whereClause[] = Topic::ARCHIVE_DONE;
|
||||
foreach ( $whereClause['binds'] as $bind )
|
||||
|
||||
@@ -353,7 +353,7 @@ class forums extends Controller
|
||||
/* Assignments */
|
||||
if( $forum->forums_bitoptions['bw_enable_assignments'] AND Bridge::i()->featureIsEnabled( 'assignments' ) )
|
||||
{
|
||||
if( Topic::modPermission( 'assign', null, $forum ) or $teams = Member::loggedIn()->teams() or Member::loggedIn()->totalAssignments() )
|
||||
if( Topic::modPermission( 'assign', null, $forum ) or $teams = Member::loggedIn()->teams() or ( Member::loggedIn()->modPermissions() and Member::loggedIn()->totalAssignments() ) )
|
||||
{
|
||||
$table->filters['filter_assigned_topics'] = 'assignment_id>0';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000044,
|
||||
"name": "5.0.0 Beta 12",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/forumDisplay",
|
||||
"front\/forums\/topicRow",
|
||||
"front\/forums\/topicRowSnippet",
|
||||
"front\/index\/simplifiedTopicRow",
|
||||
"front\/index\/simplifiedTopicRowSnippet",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_forums_forum",
|
||||
"layout_forums_topic",
|
||||
"layout_forums_post",
|
||||
"layout_forum_topic_view_firstpost"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000045,
|
||||
"name": "5.0.0 Beta 13",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/topicRowSnippet",
|
||||
"front\/index\/simplifiedTopicRow"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_forums_forum",
|
||||
"layout_forums_topic",
|
||||
"layout_forums_post",
|
||||
"layout_forum_topic_view_firstpost"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000046,
|
||||
"name": "5.0.0 Beta 14",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_forums_forum",
|
||||
"layout_forums_topic",
|
||||
"layout_forums_post",
|
||||
"layout_forum_topic_view_firstpost"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000047,
|
||||
"name": "5.0.0 Beta 14.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_forums_forum",
|
||||
"layout_forums_topic",
|
||||
"layout_forums_post",
|
||||
"layout_forum_topic_view_firstpost"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000048,
|
||||
"name": "5.0.0 Beta 14.2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_forums_forum",
|
||||
"layout_forums_topic",
|
||||
"layout_forums_post",
|
||||
"layout_forum_topic_view_firstpost"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000049,
|
||||
"name": "5.0.0",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_forums_forum",
|
||||
"layout_forums_topic",
|
||||
"layout_forums_post",
|
||||
"layout_forum_topic_view_firstpost"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,7 @@ use function array_keys;
|
||||
use function array_merge;
|
||||
use function array_shift;
|
||||
use function array_slice;
|
||||
use function array_unique;
|
||||
use function count;
|
||||
use function defined;
|
||||
use function explode;
|
||||
@@ -89,6 +90,8 @@ use function is_array;
|
||||
use function json_decode;
|
||||
use function json_encode;
|
||||
use function krsort;
|
||||
use function strpos;
|
||||
use function substr;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
@@ -468,9 +471,15 @@ class Forum extends Model implements Permissions
|
||||
*/
|
||||
public function get_last_post() : ?int
|
||||
{
|
||||
$timestamps = array_keys( $this->_last_post_data );
|
||||
sort( $timestamps );
|
||||
return count( $timestamps ) ? array_pop( $timestamps ) : null;
|
||||
$lastPostTime = 0;
|
||||
foreach( $this->_last_post_data as $k => $v )
|
||||
{
|
||||
if( $v['last_post'] > $lastPostTime )
|
||||
{
|
||||
$lastPostTime = $v['last_post'];
|
||||
}
|
||||
}
|
||||
return $lastPostTime;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -560,7 +569,7 @@ class Forum extends Model implements Permissions
|
||||
}
|
||||
|
||||
$lastPostData = [
|
||||
$updatedItem->last_post => [
|
||||
$updatedItem->last_post . $updatedItem->tid => [
|
||||
'last_post' => $updatedItem->last_post,
|
||||
'last_poster_id' => $updatedItem->last_poster_id,
|
||||
'last_poster_name' => $updatedItem->last_poster_name,
|
||||
@@ -598,6 +607,12 @@ class Forum extends Model implements Permissions
|
||||
{
|
||||
$topic = Topic::constructFromData( $row );
|
||||
$lastComment = $topic->comments( 1, 0, 'date', 'desc', null, false );
|
||||
|
||||
if ( ! $lastComment )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$lastPost = [];
|
||||
if ( $topic->last_poster_id and ! $topic->last_poster_name )
|
||||
{
|
||||
@@ -628,7 +643,7 @@ class Forum extends Model implements Permissions
|
||||
$lastPost['last_post_snippet'] = $lastComment?->truncated( true, 350 );
|
||||
$lastPost['posts'] = $topic->posts - 1;
|
||||
|
||||
$lastPostData[ $topic->last_post ] = $lastPost;
|
||||
$lastPostData[ $topic->last_post . $topic->tid ] = $lastPost;
|
||||
}
|
||||
}
|
||||
catch ( UnderflowException $e ){}
|
||||
@@ -670,6 +685,13 @@ class Forum extends Model implements Permissions
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent looking up the same members constantly when building the last post members
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static array $lastPostLoadedMembers = [];
|
||||
|
||||
/**
|
||||
* Get last post data
|
||||
*
|
||||
@@ -677,7 +699,7 @@ class Forum extends Model implements Permissions
|
||||
* @param bool $isChild
|
||||
* @return array|null
|
||||
*/
|
||||
public function lastPost( int $count=1, $isChild=false ): ?array
|
||||
public function lastPost( int $count=1, bool $isChild=false ): ?array
|
||||
{
|
||||
if ( $count > 5 )
|
||||
{
|
||||
@@ -778,7 +800,7 @@ class Forum extends Model implements Permissions
|
||||
$results = [];
|
||||
|
||||
/* Do we have any data, or do we need to update? The default or cleared state is NULL, forums without topics should have [] */
|
||||
if ( $this->sub_can_post and $this->posts and ! $this->club_id and ! $this->_data['last_post_data'] )
|
||||
if ( $this->sub_can_post and $this->posts and ! $this->_data['last_post_data'] )
|
||||
{
|
||||
$this->setLastComment();
|
||||
|
||||
@@ -811,7 +833,7 @@ class Forum extends Model implements Permissions
|
||||
'_author' => $author,
|
||||
'topic_url' => Url::internal( "app=forums&module=forums&controller=topic&id={$lastPost['last_id']}", 'front', 'forums_topic', array( $lastPost['seo_last_title'] ) ),
|
||||
'topic_title' => $lastPost['last_title'],
|
||||
'date' => $lastPostTime,
|
||||
'date' => ( $lastPost['last_post'] ?? (int) ( substr( $lastPostTime, 0, strpos( $lastPostTime, '.' ) ) ) ),
|
||||
'last_poster_anon' => $lastPost['last_poster_anon'],
|
||||
'last_post_snippet' => $lastPost['last_post_snippet'] ?? null,
|
||||
'posts' => $lastPost['posts'] ?? 0
|
||||
@@ -863,15 +885,31 @@ class Forum extends Model implements Permissions
|
||||
}
|
||||
}
|
||||
|
||||
$idsToLoad = array_unique( array_values( $membersToLoad ) );
|
||||
|
||||
/* Load the members not in static::$lastPostLoadedMembers */
|
||||
$idsToLoad = array_diff( $idsToLoad, array_keys( static::$lastPostLoadedMembers ) );
|
||||
|
||||
if ( count( $idsToLoad ) )
|
||||
{
|
||||
foreach( Db::i()->select( '*', 'core_members', [ Db::i()->in( 'member_id', $idsToLoad ) ] ) as $lastPostMember )
|
||||
{
|
||||
static::$lastPostLoadedMembers[ $lastPostMember['member_id'] ] = Member::constructFromData( $lastPostMember );
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $membersToLoad ) )
|
||||
{
|
||||
$membersLoaded = iterator_to_array( Db::i()->select( '*', 'core_members', [ Db::i()->in( 'member_id', $membersToLoad ) ] )->setKeyField( 'member_id' ) );
|
||||
|
||||
foreach ( $membersToLoad as $timestamp => $memberId )
|
||||
{
|
||||
if ( isset( $membersLoaded[$memberId] ) )
|
||||
if ( isset( static::$lastPostLoadedMembers[ $memberId ] ) )
|
||||
{
|
||||
$results[$timestamp]['author'] = Member::constructFromData( $membersLoaded[$memberId] );
|
||||
$results[$timestamp]['author'] = static::$lastPostLoadedMembers[ $memberId ];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Technically we shouldn't ever get here, but let's not throw an exception */
|
||||
$results[$timestamp]['author'] = Member::load( $memberId );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ use OutOfRangeException;
|
||||
use RuntimeException;
|
||||
use SplObserver;
|
||||
use SplSubject;
|
||||
use function array_reverse;
|
||||
use function array_slice;
|
||||
use function count;
|
||||
use function defined;
|
||||
@@ -1654,22 +1655,33 @@ class Topic extends Item implements Embeddable,
|
||||
$minMax = ( $orderDirection === 'asc' ) ? 'MIN' : 'MAX';
|
||||
/* Do some mojo to get the lowest comment and highest comment for archived topics */
|
||||
$row = ArchivedPost::db()->select( "{$minMax}( CONCAT( archive_content_date, '.', archive_id) ) as pid", 'forums_archive_posts', array( [ 'archive_topic_id=?', $this->tid, ArchivedPost::db()->in( 'archive_queued', [0,2] ) ] ) )->first();
|
||||
$pid = (int) explode( '.', $row )[1];
|
||||
|
||||
if( is_array( $extraWhereClause ) or is_null( $extraWhereClause ) )
|
||||
if ( ! $row )
|
||||
{
|
||||
$extraWhereClause[] = [ 'archive_id=?', $pid ];
|
||||
$comments[ $_hash ] = [];
|
||||
}
|
||||
else if ( is_string( $extraWhereClause ) )
|
||||
else
|
||||
{
|
||||
$extraWhereClause = [
|
||||
[ $extraWhereClause ],
|
||||
[ 'archive_id=?', $pid ]
|
||||
];
|
||||
}
|
||||
$pid = (int)explode( '.', $row )[1];
|
||||
|
||||
$data = $this->_comments( $class, 1, 0, ( isset( $class::$databaseColumnMap[$order] ) ? ( $class::$databasePrefix . $class::$databaseColumnMap[$order] ) : $order ) . ' ' . $orderDirection, $member, $includeHiddenComments, $cutoff, $canViewWarn, $extraWhereClause, $includeDeleted );
|
||||
$comments[ $_hash ] = is_array( $data ) ? array_reverse( $data, true ) : $data;
|
||||
if ( is_array( $extraWhereClause ) or is_null( $extraWhereClause ) )
|
||||
{
|
||||
$extraWhereClause[] = ['archive_id=?', $pid];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( is_string( $extraWhereClause ) )
|
||||
{
|
||||
$extraWhereClause = [
|
||||
[$extraWhereClause],
|
||||
['archive_id=?', $pid]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$data = $this->_comments( $class, 1, 0, ( isset( $class::$databaseColumnMap[$order] ) ? ( $class::$databasePrefix . $class::$databaseColumnMap[$order] ) : $order ) . ' ' . $orderDirection, $member, $includeHiddenComments, $cutoff, $canViewWarn, $extraWhereClause, $includeDeleted );
|
||||
$comments[$_hash] = is_array( $data ) ? array_reverse( $data, true ) : $data;
|
||||
}
|
||||
|
||||
$alreadyDone = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user