Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -1861,11 +1861,17 @@ class _Records extends \IPS\Content\Item implements
|
||||
* Return forum sync forum
|
||||
*
|
||||
* @return int
|
||||
* @throws \UnderflowException
|
||||
*/
|
||||
public function get__forum_forum()
|
||||
public function get__forum_forum(): int
|
||||
{
|
||||
if ( $this->container()->forum_override and static::database()->use_categories )
|
||||
{
|
||||
if( !$this->container()->forum_forum )
|
||||
{
|
||||
throw new \UnderflowException('forum_sync_disabled');
|
||||
}
|
||||
|
||||
return $this->container()->forum_forum;
|
||||
}
|
||||
|
||||
@@ -2143,7 +2149,11 @@ class _Records extends \IPS\Content\Item implements
|
||||
try
|
||||
{
|
||||
$recordClass = 'IPS\cms\Records' . $record['map_origin_database_id'];
|
||||
$return[ $record['map_field_id'] ][] = $recordClass::load( $record['map_origin_item_id'] );
|
||||
$linkedRecord = $recordClass::load( $record['map_origin_item_id'] );
|
||||
if( $linkedRecord->canView() )
|
||||
{
|
||||
$return[ $record['map_field_id'] ][] = $linkedRecord;
|
||||
}
|
||||
}
|
||||
catch ( \Exception $ex ) { }
|
||||
}
|
||||
@@ -3823,11 +3833,18 @@ class _Records extends \IPS\Content\Item implements
|
||||
$url = NULL;
|
||||
}
|
||||
|
||||
/* Remove Lazyload from fields */
|
||||
$fields = [];
|
||||
foreach( $this->fieldValues() as $k => $v )
|
||||
{
|
||||
$fields[ $k ] = \is_string( $v ) ? \IPS\Text\Parser::removeLazyLoad( $v ) : $v;
|
||||
}
|
||||
|
||||
$return = array(
|
||||
'id' => $this->primary_id_field,
|
||||
'title' => $this->_title,
|
||||
'category' => $this->container() ? $this->container()->apiOutput() : null,
|
||||
'fields' => $this->fieldValues(),
|
||||
'fields' => $fields,
|
||||
'author' => $this->author()->apiOutput( $authorizedMember ),
|
||||
'date' => \IPS\DateTime::ts( $this->record_saved )->rfc3339(),
|
||||
'description' => \IPS\Text\Parser::removeLazyLoad( $this->content() ),
|
||||
@@ -3896,9 +3913,10 @@ class _Records extends \IPS\Content\Item implements
|
||||
* @param bool $joinAuthor If true, will join the members table for the author
|
||||
* @param bool $joinLastCommenter If true, will join the members table for the last commenter
|
||||
* @param bool $showMovedLinks If true, moved item links are included in the results
|
||||
* @param array|null $location Array of item lat and long
|
||||
* @return \IPS\Patterns\ActiveRecordIterator|int
|
||||
*/
|
||||
public static function getItemsWithPermission( $where=array(), $order=NULL, $limit=10, $permissionKey='read', $includeHiddenItems=\IPS\Content\Hideable::FILTER_AUTOMATIC, $queryFlags=0, \IPS\Member $member=NULL, $joinContainer=FALSE, $joinComments=FALSE, $joinReviews=FALSE, $countOnly=FALSE, $joins=NULL, $skipPermission=FALSE, $joinTags=TRUE, $joinAuthor=TRUE, $joinLastCommenter=TRUE, $showMovedLinks=FALSE )
|
||||
public static function getItemsWithPermission( $where=array(), $order=NULL, $limit=10, $permissionKey='read', $includeHiddenItems=\IPS\Content\Hideable::FILTER_AUTOMATIC, $queryFlags=0, \IPS\Member $member=NULL, $joinContainer=FALSE, $joinComments=FALSE, $joinReviews=FALSE, $countOnly=FALSE, $joins=NULL, $skipPermission=FALSE, $joinTags=TRUE, $joinAuthor=TRUE, $joinLastCommenter=TRUE, $showMovedLinks=FALSE, $location=NULL )
|
||||
{
|
||||
$where = static::getItemsWithPermissionWhere( $where, $permissionKey, $member, $joinContainer, $skipPermission );
|
||||
return parent::getItemsWithPermission( $where, $order, $limit, $permissionKey, $includeHiddenItems, $queryFlags, $member, $joinContainer, $joinComments, $joinReviews, $countOnly, $joins, $skipPermission, $joinTags, $joinAuthor, $joinLastCommenter, $showMovedLinks );
|
||||
|
||||
Reference in new issue
Block a user