Version 3.3.4

This commit is contained in:
Neo committed 2025-12-19 00:35:52 -08:00
1 parent 78706903a2
commit fb6b5baabc
2206 files changed
+409828 -382984

No files matched your search

@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Profile Plugin Library
* Last Updated: $Date: 2011-05-31 15:22:26 -0400 (Tue, 31 May 2011) $
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Revision: 8931 $
* @version $Revision: 10914 $
*
*/
@@ -27,6 +27,8 @@ if ( ! defined( 'IN_IPB' ) )
class profile_friends extends profile_plugin_parent
{
const FRIENDS_PER_PAGE = 100;
/**
* Feturn HTML block
*
@@ -49,22 +51,45 @@ class profile_friends extends profile_plugin_parent
//-----------------------------------------
// Grab the friends
//-----------------------------------------
$this->DB->build( array( 'select' => 'f.*',
'from' => array( 'profile_friends' => 'f' ),
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
//'order' => 'm.members_display_name ASC',
'add_join' => array(
1 => array( 'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=f.friends_friend_id',
'type' => 'left' ),
2 => array( 'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=f.friends_friend_id',
'type' => 'left' )
)
) );
/* How many friends do we have? */
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as dracula', 'from' => 'profile_friends', 'where' => 'friends_member_id=' . $member['member_id'] . ' AND friends_approved=1' ) );
/* Sort out pagination */
$st = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0;
$pagination = $this->registry->output->generatePagination( array(
'totalItems' => $count['dracula'],
'itemsPerPage' => self::FRIENDS_PER_PAGE,
'currentStartValue' => $st,
'baseUrl' => "showuser={$member['member_id']}&amp;tab=friends",
'seoTemplate' => 'showuser',
'seoTitle' => $member['members_seo_name'],
) );
/* Get em! */
$queryData = array( 'select' => 'f.*',
'from' => array( 'profile_friends' => 'f' ),
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
'add_join' => array(
1 => array( 'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=f.friends_friend_id',
'type' => 'left' ),
2 => array( 'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=f.friends_friend_id',
'type' => 'left' )
)
);
// Ordering is bad because it causes a filesort, but if they have more than 100 members, we're going to have
// to order so we can paginate
if ( $count['dracula'] > self::FRIENDS_PER_PAGE )
{
$queryData['order'] = 'm.members_display_name';
$queryData['limit'] = array( $st, self::FRIENDS_PER_PAGE );
}
$this->DB->build( $queryData );
$outer = $this->DB->execute();
//-----------------------------------------
@@ -81,7 +106,7 @@ class profile_friends extends profile_plugin_parent
ksort($friends);
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member );
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member, $pagination );
//-----------------------------------------
// Macros...