Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

+24 -1
View File
@@ -51,7 +51,24 @@ class _hotTopics extends \IPS\Widget\PermissionCache
$form->add( new \IPS\Helpers\Form\Number( 'number_to_show', isset( $this->configuration['number_to_show'] ) ? $this->configuration['number_to_show'] : 5, TRUE ) );
return $form;
}
}
/**
* Is executable by app?
*
* @param string|array $app Application key (core,cms,gallery, etc)
* @return boolean
*/
public function isExecutableByApp( $app )
{
/* Kill this widget on cloud, it's meaningless */
if( \IPS\CIC )
{
return FALSE;
}
return parent::isExecutableByApp( $app );
}
/**
* Render a widget
@@ -60,6 +77,12 @@ class _hotTopics extends \IPS\Widget\PermissionCache
*/
public function render()
{
/* Kill this widget on cloud, it's meaningless */
if( \IPS\CIC )
{
return "";
}
$topics = \IPS\forums\Topic::getItemsWithPermission( array( array( 'popular_time > ? AND forums_forums.password IS NULL AND forums_forums.can_view_others=1', time() ) ), NULL, isset( $this->configuration['number_to_show'] ) ? $this->configuration['number_to_show'] : 5, 'read', \IPS\Content\Hideable::FILTER_PUBLIC_ONLY );
if ( \count( $topics ) )
{