Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -122,7 +122,7 @@ class _Databases
|
||||
}
|
||||
|
||||
/* And however many for the content items */
|
||||
$count = ceil( max( (int) $class::getItemsWithPermission( $class::sitemapWhere(), NULL, 10, 'read', \IPS\Content\Hideable::FILTER_PUBLIC_ONLY, 0, new \IPS\Member, FALSE, FALSE, FALSE, TRUE ), \IPS\Settings::i()->sitemap_databases_count ) / \IPS\Sitemap::MAX_PER_FILE );
|
||||
$count = ceil( max( (int) $class::getItemsWithPermission( $class::sitemapWhere(), NULL, 10, 'read', \IPS\Content\Hideable::FILTER_PUBLIC_ONLY, 0, new \IPS\Member, FALSE, FALSE, FALSE, TRUE ), \IPS\Settings::i()->sitemap_databases_count ) / \IPS\SITEMAP_MAX_PER_FILE );
|
||||
for( $i=1; $i <= $count; $i++ )
|
||||
{
|
||||
$files[] = $database->id . '_sitemap_database_records_' . $i;
|
||||
@@ -193,8 +193,8 @@ class _Databases
|
||||
$exploded = explode( '_', $filename );
|
||||
$block = (int) array_pop( $exploded );
|
||||
|
||||
$offset = ( $block - 1 ) * \IPS\Sitemap::MAX_PER_FILE;
|
||||
$limit = \IPS\Sitemap::MAX_PER_FILE;
|
||||
$offset = ( $block - 1 ) * \IPS\SITEMAP_MAX_PER_FILE;
|
||||
$limit = \IPS\SITEMAP_MAX_PER_FILE;
|
||||
|
||||
$totalLimit = \IPS\Settings::i()->sitemap_databases_count;
|
||||
if ( $totalLimit > -1 and ( $offset + $limit ) > $totalLimit )
|
||||
|
||||
@@ -84,12 +84,13 @@ class _Pages
|
||||
$permissionCheck = 'view';
|
||||
|
||||
$where = array( array( '(' . \IPS\Db::i()->findInSet( 'perm_' . $class::$permissionMap[ $permissionCheck ], $member->groups ) . ' OR ' . 'perm_' . $class::$permissionMap[ $permissionCheck ] . '=? )', '*' ) );
|
||||
$where[] = [ 'page_meta_index=?', 1 ];
|
||||
|
||||
$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();
|
||||
|
||||
$count = ceil( max( $count, \IPS\Settings::i()->sitemap_pages_count ) / \IPS\Sitemap::MAX_PER_FILE );
|
||||
$count = ceil( max( $count, \IPS\Settings::i()->sitemap_pages_count ) / \IPS\SITEMAP_MAX_PER_FILE );
|
||||
|
||||
for( $i=1; $i <= $count; $i++ )
|
||||
{
|
||||
@@ -123,8 +124,8 @@ class _Pages
|
||||
$exploded = explode( '_', $filename );
|
||||
$block = (int) array_pop( $exploded );
|
||||
|
||||
$offset = ( $block - 1 ) * \IPS\Sitemap::MAX_PER_FILE;
|
||||
$limit = \IPS\Sitemap::MAX_PER_FILE;
|
||||
$offset = ( $block - 1 ) * \IPS\SITEMAP_MAX_PER_FILE;
|
||||
$limit = \IPS\SITEMAP_MAX_PER_FILE;
|
||||
|
||||
$totalLimit = \IPS\Settings::i()->sitemap_pages_count;
|
||||
if ( $totalLimit > -1 and ( $offset + $limit ) > $totalLimit )
|
||||
@@ -140,8 +141,8 @@ class _Pages
|
||||
}
|
||||
|
||||
$where = array( array( '(' . \IPS\Db::i()->findInSet( 'perm_' . $class::$permissionMap[ $permissionCheck ], $member->groups ) . ' OR ' . 'perm_' . $class::$permissionMap[ $permissionCheck ] . '=? )', '*' ) );
|
||||
|
||||
$direction = ( $totalLimit > \IPS\Sitemap::MAX_PER_FILE ) ? ' ASC' : ' DESC';
|
||||
$where[] = [ 'page_meta_index=?', 1 ];
|
||||
$direction = ( $totalLimit > \IPS\SITEMAP_MAX_PER_FILE ) ? ' ASC' : ' DESC';
|
||||
$select = \IPS\Db::i()->select( '*', $class::$databaseTable, $where, 'page_id' . $direction, array( $offset, $limit ) )
|
||||
->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 ) );
|
||||
|
||||
|
||||
Reference in new issue
Block a user