Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -88,10 +88,10 @@ class Members
|
||||
* @param mixed $val Value passed into this resolver
|
||||
* @param array $args Arguments
|
||||
* @param array $context Context values
|
||||
* @param array $info
|
||||
* @param mixed $info
|
||||
* @return ActiveRecordIterator
|
||||
*/
|
||||
public function resolve( mixed $val, array $args, array $context, array $info ) : ActiveRecordIterator
|
||||
public function resolve( mixed $val, array $args, array $context, mixed $info ) : ActiveRecordIterator
|
||||
{
|
||||
$where = [];
|
||||
$sortBy = ( isset( $args['orderBy'] ) and in_array( $args['orderBy'], MemberType::getOrderByOptions() ) ) ? $args['orderBy'] : 'member_id';
|
||||
|
||||
@@ -58,10 +58,10 @@ class MessengerConversation
|
||||
* @param mixed $val Value passed into this resolver
|
||||
* @param array $args Arguments
|
||||
* @param array $context Context values
|
||||
* @param array $info
|
||||
* @param mixed $info
|
||||
* @return Conversation
|
||||
*/
|
||||
public function resolve( mixed $val, array $args, array $context, array $info ) : Conversation
|
||||
public function resolve( mixed $val, array $args, array $context, mixed $info ) : Conversation
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -107,10 +107,10 @@ class MessengerConversations
|
||||
* @param mixed $val Value passed into this resolver
|
||||
* @param array $args Arguments
|
||||
* @param array $context Context values
|
||||
* @param array $info
|
||||
* @param mixed $info
|
||||
* @return ActiveRecordIterator|array
|
||||
*/
|
||||
public function resolve( mixed $val, array $args, array $context, array $info ) : ActiveRecordIterator|array
|
||||
public function resolve( mixed $val, array $args, array $context, mixed $info ) : ActiveRecordIterator|array
|
||||
{
|
||||
// Start to build the query to fetch messages
|
||||
$where = array( array( 'core_message_topic_user_map.map_user_id=? AND core_message_topic_user_map.map_user_active=1', Member::loggedIn()->member_id ) );
|
||||
|
||||
@@ -59,10 +59,10 @@ class MessengerFolders
|
||||
* @param mixed $val Value passed into this resolver
|
||||
* @param array $args Arguments
|
||||
* @param array $context Context values
|
||||
* @param array $info
|
||||
* @param mixed $info
|
||||
* @return array|null
|
||||
*/
|
||||
public function resolve( mixed $val, array $args, array $context, array $info ) : ?array
|
||||
public function resolve( mixed $val, array $args, array $context, mixed $info ) : ?array
|
||||
{
|
||||
if( !Member::loggedIn()->member_id || Member::loggedIn()->members_disable_pm )
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@ class Search
|
||||
* @param array $context Context values
|
||||
* @return array
|
||||
*/
|
||||
public function resolve( mixed $val, array $args, array $context ) : array
|
||||
public function resolve( mixed $val, array $args, array $context, mixed $info ) : array
|
||||
{
|
||||
$where = array();
|
||||
$returnObject = array();
|
||||
@@ -149,27 +149,18 @@ class Search
|
||||
$query->filterByContent( array( $filter ) );
|
||||
}
|
||||
|
||||
$orderBy = $query->getDefaultSortMethod();
|
||||
$orderBy = $args['orderBy'] ?? $query->getDefaultSortMethod();
|
||||
|
||||
// Ordering
|
||||
if( isset( $args['orderBy'] ) )
|
||||
switch( $orderBy )
|
||||
{
|
||||
switch( $args['orderBy'] )
|
||||
{
|
||||
case 'newest':
|
||||
$query->setOrder( Query::ORDER_NEWEST_CREATED );
|
||||
case 'newest':
|
||||
$query->setOrder( Query::ORDER_NEWEST_CREATED );
|
||||
break;
|
||||
case 'relevancy':
|
||||
$query->setOrder( Query::ORDER_RELEVANCY );
|
||||
case 'relevancy':
|
||||
default:
|
||||
$query->setOrder( Query::ORDER_RELEVANCY );
|
||||
break;
|
||||
default:
|
||||
$query->setOrder( $orderBy );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->setOrder( $orderBy );
|
||||
}
|
||||
|
||||
// Get page
|
||||
|
||||
Reference in new issue
Block a user