Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -17,6 +17,7 @@ use IPS\Dispatcher;
|
||||
use IPS\forums\Forum;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Controller;
|
||||
use IPS\Node\Model;
|
||||
use IPS\Output;
|
||||
use IPS\Request;
|
||||
use OutOfRangeException;
|
||||
@@ -53,6 +54,18 @@ class forums extends Controller
|
||||
Dispatcher::i()->checkAcpPermission( 'forums_manage' );
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the node can be a root-level
|
||||
*
|
||||
* @param Model $node
|
||||
* @return bool
|
||||
*/
|
||||
public function _canBeRoot( Model $node ) : bool
|
||||
{
|
||||
/* Only allow categories to be root level */
|
||||
return $node instanceof Forum and !$node->sub_can_post;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permissions
|
||||
|
||||
@@ -120,7 +120,7 @@ class solved extends Controller
|
||||
else
|
||||
{
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack( 'menu__forums_stats_solved' );
|
||||
Output::i()->output = Theme::i()->getTemplate( 'global', 'core' )->tabs( $tabs, $activeTab, (string)$chart, Url::internal( "app=forums&module=stats&controller=solved" ), 'tab', '', 'i-padding_3' );
|
||||
Output::i()->output = Theme::i()->getTemplate( 'global', 'core' )->tabs( $tabs, $activeTab, (string)$chart, Url::internal( "app=forums&module=stats&controller=solved" ), 'tab', '', '' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -318,20 +318,6 @@ class topic extends Controller
|
||||
|
||||
$offset = ( ( $page - 1 ) * $topic::getCommentsPerPage() ) + 1;
|
||||
|
||||
if ( ( ! isset( Request::i()->sortby ) or Request::i()->sortby != 'date' ) )
|
||||
{
|
||||
if ( $topic->isArchived() )
|
||||
{
|
||||
$order = "archive_is_first desc, archive_bwoptions";
|
||||
$orderDirection = 'desc';
|
||||
}
|
||||
else
|
||||
{
|
||||
$order = "new_topic DESC, post_bwoptions DESC, post_field_int DESC, post_date";
|
||||
$orderDirection = 'ASC';
|
||||
}
|
||||
}
|
||||
|
||||
$pagination = ( $topic->commentPageCount() > 1 ) ? $topic->commentPagination( array( 'sortby' ), 'pagination', $pagesCount ) : NULL;
|
||||
}
|
||||
else
|
||||
@@ -1375,7 +1361,7 @@ class topic extends Controller
|
||||
*/
|
||||
public function _find( string $commentClass, Comment $comment, Item $item ) : void
|
||||
{
|
||||
if ( Bridge::i()->featureIsEnabled( 'topic_summary' ) )
|
||||
if ( Bridge::i()->featureIsEnabled( 'topic_summaries' ) )
|
||||
{
|
||||
$idField = $comment::$databaseColumnId;
|
||||
Bridge::i()->trackPostRankingEvent( $comment->$idField, 'linked' );
|
||||
@@ -1394,7 +1380,7 @@ class topic extends Controller
|
||||
*/
|
||||
protected function _react( string $commentClass, Comment $comment, Item $item ): void
|
||||
{
|
||||
if ( Bridge::i()->featureIsEnabled( 'topic_summary' ) )
|
||||
if ( Bridge::i()->featureIsEnabled( 'topic_summaries' ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user