Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+10 -5
View File
@@ -404,7 +404,7 @@ class Controller extends CoverPhotoController
if( Application::appIsEnabled( 'cloud' ) )
{
Output::setCacheTime( CloudApplication::getCacheDateForPage( $item->mapped('updated'), ( ( $item::$application === 'forums' and $item->isArchived() ) ? 'archived' : 'content' ) ) );
Output::setCacheTime( CloudApplication::getCacheDateForPage( $item->mapped('updated') ?? 0, ( ( $item::$application === 'forums' and $item->isArchived() ) ? 'archived' : 'content' ) ) );
}
/* Return */
@@ -574,6 +574,7 @@ class Controller extends CoverPhotoController
$showing = intval( Request::i()->showing ?: 0 );
foreach ( $newComments as $newComment )
{
$output[] = $newComment->html();
$lastId = ( $newComment->$commentIdColumn > $lastId ) ? $newComment->$commentIdColumn : $lastId;
if ( ++$showing >= $perPage )
{
@@ -1034,6 +1035,9 @@ class Controller extends CoverPhotoController
$type = $poll->poll_closed ? 'closed' : 'opened';
Session::i()->modLog( 'modlog__poll_' . $type, array( $item->url()->__toString() => FALSE, $item->mapped( 'title' ) => FALSE ), $item );
/* Fire an event */
Event::fire( 'onStateChange', $poll, [ $type ] );
Output::i()->redirect( $item->url(), $redirectMessage );
}
else
@@ -4077,7 +4081,7 @@ class Controller extends CoverPhotoController
try
{
$object = $commentClass::loadAndCheckPerms( $id );
if ( Request::i()->modaction === 'delete' AND $object->isFeatured() )
if ( IPS::classUsesTrait( $object, Featurable::class ) and Request::i()->modaction === 'delete' and $object->isFeatured() )
{
$item->unfeatureComment( $object );
}
@@ -4806,7 +4810,8 @@ class Controller extends CoverPhotoController
}
/* Check that the object can be promoted */
if( ! $objectToPromote->canFeature() )
/* @var Content $objectToPromote */
if( ! $objectToPromote->canFeature() and !$objectToPromote->isFeatured() )
{
Output::i()->error( 'no_promote_permission', '2S356/G', 403, '' );
}
@@ -4909,7 +4914,7 @@ class Controller extends CoverPhotoController
Output::i()->error( 'page_not_found', '2C356/5', 404, '' );
}
if ( ! $promote or $promote->added_by != Member::loggedIn()->member_id )
if ( ! $promote or !$objectToEdit->canFeature() )
{
Output::i()->error( 'no_module_permission', '2C366/2', 403, '' );
}
@@ -4932,7 +4937,7 @@ class Controller extends CoverPhotoController
{
if ( $images = $item->contentImages( 20 ) )
{
$form->addHtml( Theme::i()->getTemplate( 'promote' )->promoteDialogImages( $images, $promote ) );
$form->addHtml( Theme::i()->getTemplate( 'promote', 'core' )->promoteDialogImages( $images, $promote ) );
}
}
catch( BadMethodCallException ) { }