Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+10 -5
View File
@@ -1,10 +1,10 @@
<?php
/**
* @brief Table Builder for IP.Gallery albums
* @brief Table Builder for Gallery albums
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @subpackage Gallery
* @since 17 Mar 2014
* @version SVN_VERSION_NUMBER
@@ -20,7 +20,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
}
/**
* Table Builder for IP.Gallery albums
* Table Builder for Gallery albums
*/
class _Table extends \IPS\Helpers\Table\Table
{
@@ -158,8 +158,13 @@ class _Table extends \IPS\Helpers\Table\Table
$where[] = is_array( $this->filters[ $this->filter ] ) ? $this->filters[ $this->filter ] : array( $this->filters[ $this->filter ] );
}
$where[] = array( '(' . \IPS\Db::i()->findInSet( 'core_permission_index.perm_view', \IPS\Member::loggedIn()->groups ) . ' OR ' . 'core_permission_index.perm_view=? )', '*' );
/* Get results */
$it = \IPS\Db::i()->select( '*', 'gallery_albums', $where, $sortBy, array( ( $this->limit * ( $this->page - 1 ) ), $this->limit ), NULL, NULL, \IPS\DB::SELECT_SQL_CALC_FOUND_ROWS );
$it = \IPS\Db::i()->select( '*', 'gallery_albums', $where, $sortBy, array( ( $this->limit * ( $this->page - 1 ) ), $this->limit ), NULL, NULL, \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS );
$it->join( 'gallery_categories', array( "gallery_categories.category_id=gallery_albums.album_category_id" ) );
$it->join( 'core_permission_index', array( "core_permission_index.app=? AND core_permission_index.perm_type=? AND core_permission_index.perm_type_id=gallery_categories.category_id", 'gallery', 'category' ) );
$this->pages = ceil( $it->count( TRUE ) / $this->limit );
$rows = iterator_to_array( $it );