Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -28,6 +28,11 @@ class _Pages
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* @brief Can be shown in similar content
|
||||
*/
|
||||
public $similarContent = FALSE;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -28,6 +28,11 @@ class _Records
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* @brief Can be shown in similar content
|
||||
*/
|
||||
public $similarContent = TRUE;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -161,10 +161,24 @@ class _MoveComments
|
||||
}
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'cms_database_comments', $where, "comment_id ASC", $this->rebuild ), $commentClass ) AS $row )
|
||||
{
|
||||
/* First, create the topic if it doesn't already exist */
|
||||
if ( !$row->item()->record_topicid )
|
||||
/* Check the record exists */
|
||||
try
|
||||
{
|
||||
$row->item()->syncTopic( FALSE ); # Sync Topic will create it for us and link it, while also handling database and category level settings.
|
||||
$row->item();
|
||||
|
||||
/* First, create the topic if it doesn't already exist */
|
||||
if ( !$row->item()->record_topicid )
|
||||
{
|
||||
$row->item()->syncTopic( FALSE ); # Sync Topic will create it for us and link it, while also handling database and category level settings.
|
||||
}
|
||||
}
|
||||
// Exception may be that the item does not exist, or the category does not have syncing enabled
|
||||
catch( \UnderflowException | \OutOfRangeException $e )
|
||||
{
|
||||
$data['lastId'] = $row->id;
|
||||
$data['done']++;
|
||||
$done++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* I'm not sure how to do this properly yet */
|
||||
|
||||
@@ -114,10 +114,11 @@ class _Databases
|
||||
|
||||
if ( isset( $class::$containerNodeClass ) )
|
||||
{
|
||||
$nodeClass = $class::$containerNodeClass;
|
||||
|
||||
/* We need one file for the nodes */
|
||||
$files[] = $database->id . '_sitemap_database_categories';
|
||||
if ( $database->use_categories )
|
||||
{
|
||||
/* We need one file for the nodes */
|
||||
$files[] = $database->id . '_sitemap_database_categories';
|
||||
}
|
||||
}
|
||||
|
||||
/* And however many for the content items */
|
||||
@@ -151,7 +152,6 @@ class _Databases
|
||||
$databaseId = \intval( array_shift( $tmp ) );
|
||||
try
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( $databaseId );
|
||||
$class = '\IPS\cms\Records' . $databaseId;
|
||||
if ( isset( $class::$containerNodeClass ) )
|
||||
{
|
||||
|
||||
@@ -84,8 +84,8 @@ class _Pages
|
||||
$permissionCheck = 'view';
|
||||
|
||||
$where = array( array( '(' . \IPS\Db::i()->findInSet( 'perm_' . $class::$permissionMap[ $permissionCheck ], $member->groups ) . ' OR ' . 'perm_' . $class::$permissionMap[ $permissionCheck ] . '=? )', '*' ) );
|
||||
|
||||
$count = \IPS\Db::i()->select( '*', $class::$databaseTable )
|
||||
|
||||
$count = \IPS\Db::i()->select( '*', $class::$databaseTable, $where )
|
||||
->join( 'core_permission_index', array( "core_permission_index.app=? AND core_permission_index.perm_type=? AND core_permission_index.perm_type_id=" . $class::$databaseTable . "." . $class::$databasePrefix . $class::$databaseColumnId, $class::$permApp, $class::$permType ) )
|
||||
->count();
|
||||
|
||||
|
||||
Reference in new issue
Block a user