Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board v3.4.5
|
||||
* Allow user to change their status
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* Last Updated: $Date: 2013-05-02 11:20:01 -0400 (Thu, 02 May 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: AndyMillne $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 10914 $
|
||||
* @version $Revision: 12213 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -84,6 +84,52 @@ class public_members_profile_status extends ipsCommand
|
||||
case 'unlockStatus':
|
||||
$this->_unlockStatus();
|
||||
break;
|
||||
case 'approveStatus':
|
||||
$this->_approveStatus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve a status
|
||||
*
|
||||
*/
|
||||
protected function _approveStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10282, null, null, 404 );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
|
||||
$status = $this->registry->getClass('memberStatus')->fetch();
|
||||
|
||||
/* Can we approve? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canApproveStatus() )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10283, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->approveStatus();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_approved'], base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_approved'], $this->settings['base_url'] . 'showuser=' . $status[$status_id]['status_member_id'], $this->memberData['members_seo_name'] . '&tab=status' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,25 +216,30 @@ class public_members_profile_status extends ipsCommand
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a status reply
|
||||
* Show status updates list
|
||||
*
|
||||
*/
|
||||
protected function _list()
|
||||
{
|
||||
if ( ! $this->settings['su_enabled'] )
|
||||
{
|
||||
$this->registry->output->showError( 'su_disabled', 1028277, null, null, 404 );
|
||||
}
|
||||
|
||||
/* INIT */
|
||||
$filters = array( 'offset' => intval( $this->request['st'] ), 'limit' => 15, 'getCount' => true );
|
||||
|
||||
/* Add to the filters */
|
||||
if ( $this->request['member_id'] )
|
||||
{
|
||||
$filters['relatedTo'] = intval( $this->request['member_id'] );
|
||||
$filters['isApproved'] = true;
|
||||
}
|
||||
else if ( $this->request['status_id'] )
|
||||
if ( $this->request['status_id'] )
|
||||
{
|
||||
$filters['status_id'] = intval( $this->request['status_id'] );
|
||||
$filters['type'] = 'all';
|
||||
}
|
||||
else if ( $this->request['member_id'] )
|
||||
{
|
||||
$filters['relatedTo'] = intval( $this->request['member_id'] );
|
||||
$filters['isApproved'] = true;
|
||||
}
|
||||
else if ( $this->request['type'] == 'friends' )
|
||||
{
|
||||
$filters['friends_only'] = 1;
|
||||
@@ -202,6 +253,17 @@ class public_members_profile_status extends ipsCommand
|
||||
$statuses = $this->registry->getClass('memberStatus')->fetch( $this->memberData, $filters );
|
||||
$count = $this->registry->getClass('memberStatus')->getStatusCount();
|
||||
|
||||
/* Add canonical */
|
||||
if ( count( $statuses ) && $this->request['status_id'] )
|
||||
{
|
||||
$tmp = $statuses;
|
||||
$pop = array_pop( $tmp );
|
||||
|
||||
$this->registry->output->addCanonicalTag( 'app=members&module=profile&section=status&type=single', array( $pop['member_id'], $pop['members_seo_name'] ), 'members_status_single' );
|
||||
|
||||
$this->registry->getClass('output')->checkPermalink( array( $pop['member_id'], $pop['members_seo_name'] ) );
|
||||
}
|
||||
|
||||
$pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count,
|
||||
'itemsPerPage' => 15,
|
||||
'currentStartValue' => $this->request['st'],
|
||||
|
||||
Reference in new issue
Block a user