Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -12,50 +12,53 @@
|
||||
namespace IPS\downloads\widgets;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Content\WidgetComment;
|
||||
use IPS\Output;
|
||||
use IPS\Theme;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* downloadsCommentFeed Widget
|
||||
*/
|
||||
class _downloadsCommentFeed extends \IPS\Content\WidgetComment
|
||||
class downloadsCommentFeed extends WidgetComment
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = 'downloadsCommentFeed';
|
||||
public string $key = 'downloadsCommentFeed';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = 'downloads';
|
||||
public string $app = 'downloads';
|
||||
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '';
|
||||
|
||||
/**
|
||||
* Class
|
||||
*/
|
||||
protected static $class = 'IPS\downloads\File\Comment';
|
||||
protected static string $class = 'IPS\downloads\File\Comment';
|
||||
|
||||
/**
|
||||
* @brief Moderator permission to generate caches on [optional]
|
||||
*/
|
||||
protected $moderatorPermissions = array( 'can_view_hidden_content', 'can_view_hidden_downloads_file_comment' );
|
||||
protected array $moderatorPermissions = array( 'can_view_hidden_content', 'can_view_hidden_downloads_file_comment' );
|
||||
|
||||
/**
|
||||
* Init the widget
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
public function init(): void
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'widgets.css', 'downloads', 'front' ) );
|
||||
Output::i()->cssFiles = array_merge( Output::i()->cssFiles, Theme::i()->css( 'widgets.css', 'downloads', 'front' ) );
|
||||
|
||||
parent::init();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user