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

+7 -4
View File
@@ -68,7 +68,8 @@ class _DatabaseFilters extends \IPS\Widget
try
{
$category = \IPS\cms\Categories::load( \IPS\cms\Databases\Dispatcher::i()->categoryId );
$categoryClass = "IPS\cms\Categories" . \IPS\cms\Databases\Dispatcher::i()->databaseId;
$category = $categoryClass::load( \IPS\cms\Databases\Dispatcher::i()->categoryId );
}
catch ( \OutOfRangeException $e )
{
@@ -79,7 +80,7 @@ class _DatabaseFilters extends \IPS\Widget
{
return '';
}
$fieldClass = 'IPS\cms\Fields' . $database->id;
$fields = array();
@@ -133,11 +134,11 @@ class _DatabaseFilters extends \IPS\Widget
$cookieValues[ 'field_' . $field->id ] = $members;
}
}
foreach( $fieldClass::fields( $cookieValues, 'view', $category, $fieldClass::FIELD_SKIP_TITLE_CONTENT | $fieldClass::FIELD_DISPLAY_FILTERS ) as $id => $field )
foreach( $fieldClass::fields( $cookieValues, 'view', $category, $fieldClass::FIELD_SKIP_TITLE_CONTENT | $fieldClass::FIELD_DISPLAY_FILTERS, NULL, FALSE ) as $id => $field )
{
/* Force a unique ID to prevent other areas using this same field htmlID */
$field->htmlId = $field->name .'_' . md5( uniqid() );
$fields[ $id ] = $field;
}
@@ -265,6 +266,8 @@ class _DatabaseFilters extends \IPS\Widget
}
else
{
/* Remove the filter cookie */
$category->saveFilterCookie( FALSE );
\IPS\Output::i()->redirect( $url->setQueryString( $params ) );
}
}
+22
View File
@@ -12,6 +12,9 @@
namespace IPS\cms\widgets;
/* To prevent PHP errors (extending class does not exist) revealing path */
use IPS\Db;
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
@@ -219,9 +222,28 @@ class _RecordFeed extends \IPS\Content\Widget
protected function buildWhere()
{
static::$class = '\IPS\cms\Records' . $this->configuration['cms_rf_database'];
$class = static::$class;
$where = parent::buildWhere();
/* If we did not select any categories and we are honoring permissions, filter out club categories */
if( empty( $this->configuration['widget_feed_container'] ) and !empty( $this->configuration['widget_feed_use_perms'] ) )
{
$database = \IPS\cms\Databases::load( $this->configuration['cms_rf_database'] );
if( $database->use_categories and $database->allow_club_categories )
{
/* Loop through and get only the categories that the user can view */
$nodes = [];
$categoriesClass = 'IPS\cms\Categories' . $this->configuration['cms_rf_database'];
foreach( $categoriesClass::roots( 'read' ) as $cat )
{
$nodes[] = $cat->_id;
}
$where[] = [ Db::i()->in( $class::$databaseTable . '.category_id', $nodes ) ];
}
}
$fieldClass = 'IPS\cms\Fields' . $this->configuration['cms_rf_database'];
$customFields = $fieldClass::data( 'view', NULL, $fieldClass::FIELD_SKIP_TITLE_CONTENT | $fieldClass::FIELD_DISPLAY_FILTERS );
+18
View File
@@ -39,6 +39,24 @@ class _Rss extends \IPS\Widget\StaticCache
public $plugin = '';
/**
* Constructor
*
* @param String $uniqueKey Unique key for this specific instance
* @param array $configuration Widget custom configuration
* @param null|string|array $access Array/JSON string of executable apps (core=sidebar only, content=IP.Content only, etc)
* @param null|string $orientation Orientation (top, bottom, right, left)
* @return void
*/
public function __construct( $uniqueKey, array $configuration, $access=null, $orientation=null )
{
parent::__construct( $uniqueKey, $configuration, $access, $orientation );
if( isset( $this->configuration['block_rss_import_cache'] ) )
{
$this->cacheExpiration = $this->configuration['block_rss_import_cache'] * 60;
}
}
/**
* Specify widget configuration
*
* @param null|\IPS\Helpers\Form $form Form object