Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

+21 -14
View File
@@ -1,12 +1,11 @@
<?php
/**
* @brief Table Builder using a database table datasource
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPS\Helpers\Table;
@@ -151,6 +150,10 @@ class _Db extends Table
{
$where[] = $clause;
}
else
{
unset( $advancedSearchValues[ $k ] );
}
break;
case SEARCH_CONTAINS_TEXT:
@@ -173,6 +176,11 @@ class _Db extends Table
case SEARCH_DATE_RANGE:
$timezone = ( \IPS\Member::loggedIn()->timezone ? new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) : NULL );
if( !$v['start'] AND !$v['end'] )
{
unset( $advancedSearchValues[ $k ] );
}
if ( $v['start'] )
{
if( !( $v['start'] instanceof \IPS\DateTime ) )
@@ -205,9 +213,13 @@ class _Db extends Table
break;
case SEARCH_MEMBER:
if( $v instanceof \IPS\Member )
if ( $v )
{
$where[] = array( "{$k}=?", $v->member_id );
$where[] = array( "{$k}=?", ( $v instanceof \IPS\Member ) ? $v->member_id : $v );
}
else
{
unset( $advancedSearchValues[ $k ] );
}
break;
@@ -312,7 +324,7 @@ class _Db extends Table
$count = $count->first();
/* Now get column headers */
$query = \IPS\Db::i()->select( $this->onlySelected ? implode( ', ', $selects ) : '*', $this->table, $where, NULL, array( 0, 1 ), $this->group );
$query = \IPS\Db::i()->select( $this->onlySelected ? implode( ', ', $selects ) : '*', $this->table, NULL, NULL, array( 0, 1 ) );
if ( count( $this->joins ) )
{
@@ -321,11 +333,6 @@ class _Db extends Table
$query->join( $join['from'], ( isset( $join['where'] ) ? $join['where'] : null ), ( isset( $join['type'] ) ) ? $join['type'] : 'LEFT' );
}
}
if ( $this->index )
{
$query->forceIndex( $this->index );
}
try
{
@@ -403,7 +410,7 @@ class _Db extends Table
$row[ $k ] = isset( $_row[ $k ] ) ? $_row[ $k ] : NULL;
}
if( !empty( $advancedSearchValues ) )
if( !empty( $advancedSearchValues ) AND !isset( \IPS\Request::i()->noColumn ) )
{
foreach ( $advancedSearchValues as $k => $v )
{