Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -120,6 +120,13 @@ class _Database extends \IPS\Widget
|
||||
try
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( intval( $this->configuration['database'] ) );
|
||||
|
||||
if ( ! $database->page_id and \IPS\cms\Pages\Page::$currentPage )
|
||||
{
|
||||
$database->page_id = \IPS\cms\Pages\Page::$currentPage->id;
|
||||
$database->save();
|
||||
}
|
||||
|
||||
static::$html = \IPS\cms\Databases\Dispatcher::i()->setDatabase( $database->id )->run();
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
|
||||
@@ -88,14 +88,15 @@ class _RecordFeed extends \IPS\Content\Widget
|
||||
$form = parent::configuration( $form );
|
||||
|
||||
/* Tags */
|
||||
if ( $database and $database->tags_enabled )
|
||||
if ( $database )
|
||||
{
|
||||
/* Sort */
|
||||
$sortOptions = array(
|
||||
'primary_id_field' => 'database_field__id',
|
||||
'member_id' => 'database_field__member',
|
||||
'record_publish_date' => 'database_field__saved',
|
||||
'record_last_comment' => ( $database and $database->_comment_bump === \IPS\cms\Databases::BUMP_ON_EDIT ) ? 'database_field__edited' : 'database_field__updated',
|
||||
'record_updated' => ( $database and $database->_comment_bump === \IPS\cms\Databases::BUMP_ON_EDIT ) ? 'database_field__edited' : 'database_field__updated',
|
||||
'record_last_comment' => 'sort_record_last_comment',
|
||||
'record_rating' => 'database_field__rating'
|
||||
);
|
||||
|
||||
@@ -124,22 +125,25 @@ class _RecordFeed extends \IPS\Content\Widget
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'widget_feed_sort_on', isset( $this->configuration['widget_feed_sort_on'] ) ? $this->configuration['widget_feed_sort_on'] : $class::$databaseColumnMap['updated'], FALSE, array( 'options' => $sortOptions ) ), NULL, NULL, NULL, 'widget_feed_sort_on' );
|
||||
|
||||
$options = array( 'autocomplete' => array( 'unique' => TRUE, 'source' => NULL, 'freeChoice' => TRUE ) );
|
||||
|
||||
if ( \IPS\Settings::i()->tags_force_lower )
|
||||
|
||||
if ( $database->tags_enabled )
|
||||
{
|
||||
$options['autocomplete']['forceLower'] = TRUE;
|
||||
$options = array( 'autocomplete' => array( 'unique' => TRUE, 'source' => NULL, 'freeChoice' => TRUE ) );
|
||||
|
||||
if ( \IPS\Settings::i()->tags_force_lower )
|
||||
{
|
||||
$options['autocomplete']['forceLower'] = TRUE;
|
||||
}
|
||||
|
||||
if ( \IPS\Settings::i()->tags_clean )
|
||||
{
|
||||
$options['autocomplete']['filterProfanity'] = TRUE;
|
||||
}
|
||||
|
||||
$options['autocomplete']['prefix'] = FALSE;
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'widget_feed_tags', ( isset( $this->configuration['widget_feed_tags'] ) ? $this->configuration['widget_feed_tags'] : array( 'tags' => NULL ) ), FALSE, $options ) );
|
||||
}
|
||||
|
||||
if ( \IPS\Settings::i()->tags_clean )
|
||||
{
|
||||
$options['autocomplete']['filterProfanity'] = TRUE;
|
||||
}
|
||||
|
||||
$options['autocomplete']['prefix'] = FALSE;
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'widget_feed_tags', ( isset( $this->configuration['widget_feed_tags'] ) ? $this->configuration['widget_feed_tags'] : array( 'tags' => NULL ) ), FALSE, $options ) );
|
||||
}
|
||||
|
||||
/* Any filterable fields */
|
||||
|
||||
@@ -111,7 +111,7 @@ class _Rss extends \IPS\Widget\StaticCache
|
||||
{
|
||||
$items[ $guid ] = array(
|
||||
'title' => $article['title'],
|
||||
'content' => \IPS\Text\Parser::parseStatic( $article['content'] ),
|
||||
'content' => \IPS\Text\Parser::parseStatic( $article['content'], TRUE, NULL, new \IPS\Member ),
|
||||
'link' => (string) $article['link'],
|
||||
'date' => ( $article['date'] instanceof \IPS\DateTime ) ? $article['date']->getTimestamp() : $article['date']
|
||||
);
|
||||
|
||||
@@ -107,6 +107,7 @@ class _Wysiwyg extends \IPS\Widget\StaticCache
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_core.js', 'core' ) );
|
||||
return $this->output( isset( $this->configuration['content'] ) ? $this->configuration['content'] : '' );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user