Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+6 -9
View File
@@ -12,7 +12,7 @@
namespace IPS\blog\widgets;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -58,10 +58,7 @@ class _blogs extends \IPS\Widget\PermissionCache
*/
public function configuration( &$form=null )
{
if ( $form === null )
{
$form = new \IPS\Helpers\Form;
}
$form = parent::configuration( $form );
/* Block title */
$form->add( new \IPS\Helpers\Form\Text( 'widget_feed_title', isset( $this->configuration['widget_feed_title'] ) ? $this->configuration['widget_feed_title'] : \IPS\Member::loggedIn()->language()->addToStack( 'blogs' ) ) );
@@ -70,7 +67,7 @@ class _blogs extends \IPS\Widget\PermissionCache
$author = NULL;
try
{
if ( isset( $this->configuration['widget_feed_author'] ) and is_array( $this->configuration['widget_feed_author'] ) )
if ( isset( $this->configuration['widget_feed_author'] ) and \is_array( $this->configuration['widget_feed_author'] ) )
{
foreach( $this->configuration['widget_feed_author'] as $id )
{
@@ -126,7 +123,7 @@ class _blogs extends \IPS\Widget\PermissionCache
*/
public function preConfig( $values )
{
if ( is_array( $values['widget_feed_author'] ) )
if ( \is_array( $values['widget_feed_author'] ) )
{
$members = array();
foreach( $values['widget_feed_author'] as $member )
@@ -151,7 +148,7 @@ class _blogs extends \IPS\Widget\PermissionCache
$sortBy = ( isset( $this->configuration['widget_feed_sort_on'] ) and isset( $this->configuration['widget_feed_sort_dir'] ) ) ? ( $this->configuration['widget_feed_sort_on'] . ' ' . $this->configuration['widget_feed_sort_dir'] ) : NULL;
$limit = isset( $this->configuration['widget_feed_show'] ) ? $this->configuration['widget_feed_show'] : 5;
if ( isset( $this->configuration['widget_feed_author'] ) and is_array( $this->configuration['widget_feed_author'] ) and count( $this->configuration['widget_feed_author'] ) )
if ( isset( $this->configuration['widget_feed_author'] ) and \is_array( $this->configuration['widget_feed_author'] ) and \count( $this->configuration['widget_feed_author'] ) )
{
$where[] = array( \IPS\Db::i()->in( 'blog_member_id', $this->configuration['widget_feed_author'] ) );
}
@@ -166,7 +163,7 @@ class _blogs extends \IPS\Widget\PermissionCache
$blogs[] = $blog;
}
if ( count( $blogs ) )
if ( \count( $blogs ) )
{
return $this->output( $blogs, isset( $this->configuration['widget_feed_title'] ) ? $this->configuration['widget_feed_title'] : \IPS\Member::loggedIn()->language()->addToStack( 'blogs' ) );
}