Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -99,7 +99,7 @@ class _Db extends Table
|
||||
{
|
||||
if ( is_callable( $this->quickSearch ) )
|
||||
{
|
||||
$where[] = call_user_func( $this->quickSearch, \IPS\Request::i()->quicksearch );
|
||||
$where[] = call_user_func( $this->quickSearch, trim( \IPS\Request::i()->quicksearch ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,7 +112,7 @@ class _Db extends Table
|
||||
$_where[] = "LOWER(`{$c}`) LIKE CONCAT( '%', ?, '%' )";
|
||||
}
|
||||
|
||||
$where[] = array_merge( array( '(' . implode( ' OR ', $_where ) . ')' ), array_fill( 0, count( $_where ), mb_strtolower( \IPS\Request::i()->quicksearch ) ) );
|
||||
$where[] = array_merge( array( '(' . implode( ' OR ', $_where ) . ')' ), array_fill( 0, count( $_where ), mb_strtolower( trim( \IPS\Request::i()->quicksearch ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,14 @@ class _Db extends Table
|
||||
break;
|
||||
|
||||
case SEARCH_SELECT:
|
||||
$where[] = array( "{$k}=?", $v );
|
||||
if ( isset( $options['multiple'] ) AND $options['multiple'] === TRUE )
|
||||
{
|
||||
$where[] = array( \IPS\Db::i()->in( $k, $v ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$where[] = array( "{$k}=?", $v );
|
||||
}
|
||||
break;
|
||||
|
||||
case SEARCH_MEMBER:
|
||||
@@ -262,7 +269,7 @@ class _Db extends Table
|
||||
{
|
||||
foreach( $this->joins as $join )
|
||||
{
|
||||
$query->join( $join['from'], ( isset( $join['where'] ) ? $join['where'] : null ), 'LEFT' );
|
||||
$query->join( $join['from'], ( isset( $join['where'] ) ? $join['where'] : null ), ( isset( $join['type'] ) ) ? $join['type'] : 'LEFT' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +344,7 @@ class _Db extends Table
|
||||
{
|
||||
$select->setKeyField( $this->keyField );
|
||||
}
|
||||
|
||||
|
||||
foreach ( $select as $rowId => $row )
|
||||
{
|
||||
/* Add in any 'custom' fields */
|
||||
@@ -349,7 +356,7 @@ class _Db extends Table
|
||||
{
|
||||
$row[ $k ] = isset( $_row[ $k ] ) ? $_row[ $k ] : NULL;
|
||||
}
|
||||
|
||||
|
||||
if( !empty( $advancedSearchValues ) )
|
||||
{
|
||||
foreach ( $advancedSearchValues as $k => $v )
|
||||
@@ -369,7 +376,7 @@ class _Db extends Table
|
||||
}
|
||||
else
|
||||
{
|
||||
$v = htmlentities( $v, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
$v = htmlspecialchars( $v, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
}
|
||||
|
||||
/* Are we including this one? */
|
||||
|
||||
Reference in new issue
Block a user