Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Allow user to change their status
|
||||
* Last Updated: $Date: 2010-10-04 21:50:24 -0400 (Mon, 04 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-07-05 09:10:56 -0400 (Tue, 05 Jul 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6942 $
|
||||
* @version $Revision: 9154 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,8 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -84,17 +83,28 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested skin group
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
protected function getSkinGroup()
|
||||
{
|
||||
return ( !in_array( $this->request['skin_group'], array('boards', 'profile') ) ) ? 'profile' : $this->request['skin_group'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _showAll()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$st = intval( $this->request['st'] );
|
||||
|
||||
$skin_group = $this->getSkinGroup();
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
@@ -112,14 +122,13 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$statusData = $this->registry->getClass('memberStatus')->getStatusData();
|
||||
|
||||
/* Fetch */
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'status_replies' => $statusData['status_replies'] + 1, 'html' => $this->cleanOutput( $this->registry->getClass('output')->getTemplate('profile')->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies() ) ) ) );
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'status_replies' => $statusData['status_replies'] + 1, 'html' => $this->cleanOutput( $this->registry->getClass('output')->getTemplate( $skin_group )->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies() ) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _lockStatus()
|
||||
{
|
||||
@@ -154,8 +163,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _unlockStatus()
|
||||
{
|
||||
@@ -190,8 +198,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Delete a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _deleteStatus()
|
||||
{
|
||||
@@ -226,8 +233,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Delete a status reply
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _deleteReply()
|
||||
{
|
||||
@@ -264,8 +270,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _reply()
|
||||
{
|
||||
@@ -273,6 +278,8 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$comment = $this->convertAndMakeSafe( $_POST['content'] );
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
$skin_group = $this->getSkinGroup();
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id OR ! $comment )
|
||||
@@ -299,7 +306,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$this->registry->getClass('memberStatus')->reply();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$reply = $this->registry->getClass('output')->getTemplate('profile')->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies( $status_id, array( 'sort_dir' => 'desc', 'limit' => 1 ) ) );
|
||||
$reply = $this->registry->getClass('output')->getTemplate( $skin_group )->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies( $status_id, array( 'sort_dir' => 'desc', 'limit' => 1 ) ) );
|
||||
|
||||
/* And the number of replies */
|
||||
$statusData = $this->registry->getClass('memberStatus')->getStatusData();
|
||||
@@ -310,8 +317,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Add a new statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _new()
|
||||
{
|
||||
@@ -322,6 +328,8 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$smallSpace = intval( $this->request['smallSpace'] );
|
||||
$su_Twitter = intval( $this->request['su_Twitter'] );
|
||||
$su_Facebook = intval( $this->request['su_Facebook'] );
|
||||
$skin_group = $this->getSkinGroup();
|
||||
$forMemberId = intval( $this->request['forMemberId'] );
|
||||
|
||||
/* Got content? */
|
||||
if( !trim( $this->convertAndMakeSafe( str_replace( array( ' ', ' ' ), '', $_POST['content'] ) ) ) )
|
||||
@@ -335,20 +343,36 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/* Set Content */
|
||||
$this->registry->getClass('memberStatus')->setContent( trim( $this->convertAndMakeSafe( $_POST['content'] ) ) );
|
||||
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
|
||||
/* Can we reply? */
|
||||
/* Can we create? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canCreate() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update or comment? */
|
||||
if ( $forMemberId && $forMemberId != $this->memberData['member_id'] )
|
||||
{
|
||||
$owner = IPSMember::load( $forMemberId );
|
||||
|
||||
if ( ! $owner['pp_setting_count_comments'] )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Set owner */
|
||||
$this->registry->getClass('memberStatus')->setStatusOwner( $owner );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$newStatus = $this->registry->getClass('memberStatus')->create();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$new = $this->registry->getClass('output')->getTemplate('profile')->statusUpdates( $this->registry->getClass('memberStatus')->fetch( $this->memberData['member_id'], array( 'member_id' => $this->memberData['member_id'], 'sort_dir' => 'desc', 'limit' => 1 ) ), $smallSpace );
|
||||
$new = $this->registry->getClass('output')->getTemplate( $skin_group )->statusUpdates( $this->registry->getClass('memberStatus')->fetch( $this->memberData['member_id'], array( 'relatedTo' => $member['member_id'], 'isApproved' => true, 'sort_dir' => 'desc', 'limit' => 1 ) ), $smallSpace );
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'html' => $this->cleanOutput( $new ) ) );
|
||||
|
||||
|
||||
Reference in new issue
Block a user