Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -11,7 +11,7 @@
namespace IPS\core\Promote;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -40,7 +40,7 @@ class _PublicTable extends \IPS\Helpers\Table\Table
/**
* Constructor
*
* @param \IPS\Http\Url Base URL
* @param \IPS\Http\Url $url Base URL
* @return void
*/
public function __construct( \IPS\Http\Url $url=NULL )
@@ -60,7 +60,7 @@ class _PublicTable extends \IPS\Helpers\Table\Table
*/
public function setMember( \IPS\Member $member )
{
$this->where[] = array( 'member=?', $member->member_id );
$this->where[] = array( '`member`=?', $member->member_id );
}
/**
@@ -74,20 +74,20 @@ class _PublicTable extends \IPS\Helpers\Table\Table
if ( static::$rows === NULL )
{
/* Check sortBy */
$this->sortBy = in_array( $this->sortBy, $this->sortOptions ) ? $this->sortBy : 'promote_sent';
$this->sortBy = \in_array( $this->sortBy, $this->sortOptions ) ? $this->sortBy : 'promote_sent';
/* What are we sorting by? */
$sortBy = $this->sortBy . ' ' . ( mb_strtolower( $this->sortDirection ) == 'asc' ? 'asc' : 'desc' );
/* Specify filter in where clause */
$where = isset( $this->where ) ? is_array( $this->where ) ? $this->where : array( $this->where ) : array();
$where = isset( $this->where ) ? \is_array( $this->where ) ? $this->where : array( $this->where ) : array();
if ( $this->filter and isset( $this->filters[ $this->filter ] ) )
{
$where[] = is_array( $this->filters[ $this->filter ] ) ? $this->filters[ $this->filter ] : array( $this->filters[ $this->filter ] );
$where[] = \is_array( $this->filters[ $this->filter ] ) ? $this->filters[ $this->filter ] : array( $this->filters[ $this->filter ] );
}
$where[] = array( 'promote_internal=1 and promote_sent > 0' );
$where[] = array( '( promote_internal=1 and promote_sent > 0 and promote_hide=0 )' );
/* Get Count */
$count = \IPS\Db::i()->select( 'COUNT(*) as cnt', 'core_social_promote', $where )->first();