Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -79,7 +79,7 @@ class _Records
|
||||
|
||||
$data = \IPS\Data\Store::i()->cms_files_move_data;
|
||||
|
||||
if ( ! \count( $data ) )
|
||||
if ( !is_countable( $data ) OR ! \count( $data ) )
|
||||
{
|
||||
/* all done */
|
||||
unset( \IPS\Data\Store::i()->cms_files_move_data );
|
||||
|
||||
@@ -172,7 +172,22 @@ class _Pages extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*/
|
||||
public function active()
|
||||
{
|
||||
return ( \IPS\cms\Pages\Page::$currentPage and \IPS\cms\Pages\Page::$currentPage->id == $this->configuration['menu_content_page'] );
|
||||
$page = \IPS\cms\Pages\Page::$currentPage;
|
||||
if ( !$page )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if ( $db = $page->getDatabase() and $db->allow_club_categories and $categoryClass = '\\IPS\\cms\\Categories' . $db->id and \IPS\cms\Databases\Dispatcher::i()->categoryId and $categoryClass::load( \IPS\cms\Databases\Dispatcher::i()->categoryId )->club() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch ( \OutOfRangeException|\OutOfBoundsException ) {}
|
||||
|
||||
return $page->id == $this->configuration['menu_content_page'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,7 +174,7 @@ class _MoveComments
|
||||
catch( \OutOfRangeException )
|
||||
{
|
||||
/* If the topic does not exist, reset the value so it can be re-created */
|
||||
$row->item()->record_topicid = NULL;
|
||||
$row->item()->record_topicid = 0;
|
||||
$row->item()->save();
|
||||
}
|
||||
|
||||
|
||||
@@ -125,9 +125,11 @@ class _RssImport
|
||||
$member = \IPS\Member::load( $rss->member );
|
||||
$fieldsClass = '\IPS\cms\Fields' . $recordClass::database()->id;
|
||||
$customFields = $fieldsClass::fields( $settings, 'add' );
|
||||
$fieldData = $fieldsClass::data();
|
||||
$linkedFields = [];
|
||||
|
||||
$values = array(
|
||||
'content_field_' . $recordClass::database()->field_title => $article['title'],
|
||||
'content_field_' . $recordClass::database()->field_title => $rss->topic_pre . $article['title'],
|
||||
'content_field_' . $recordClass::database()->field_content => $content,
|
||||
'record_member_id' => $member
|
||||
);
|
||||
@@ -164,6 +166,11 @@ class _RssImport
|
||||
{
|
||||
$record->$k = $v;
|
||||
}
|
||||
|
||||
if( isset( $fieldData[ $id ] ) and $fieldData[ $id ]->type == 'Item' )
|
||||
{
|
||||
$linkedFields[] = $fieldData[ $id ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +205,12 @@ class _RssImport
|
||||
}
|
||||
|
||||
$record->save();
|
||||
|
||||
/* Process Linked Fields */
|
||||
foreach( $linkedFields as $field )
|
||||
{
|
||||
$record->processItemFieldData( $field );
|
||||
}
|
||||
|
||||
return $record;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user