Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Member property updater (AJAX)
|
||||
* Last Updated: $Date: 2010-09-24 21:21:39 -0400 (Fri, 24 Sep 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @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 Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 6915 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,8 @@ class admin_forums_ajax_member_editform extends ipsAjaxCommand
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -49,94 +48,17 @@ class admin_forums_ajax_member_editform extends ipsAjaxCommand
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'remove_avatar':
|
||||
$this->_removeAvatar();
|
||||
break;
|
||||
|
||||
case 'get_avatar_images':
|
||||
$this->_getAvatarImages();
|
||||
break;
|
||||
|
||||
case 'show':
|
||||
default:
|
||||
$this->show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get avatar images in a directory
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
protected function _getAvatarImages()
|
||||
{
|
||||
$dir = IPSText::alphanumericalClean( urldecode( $this->request['cat'] ), ' ' );
|
||||
$images = IPSMember::getFunction()->getHostedAvatarsFromCategory( $dir );
|
||||
|
||||
IPSDebug::fireBug( 'info', array( 'Directory: ' . $dir ) );
|
||||
|
||||
if ( $images === FALSE )
|
||||
{
|
||||
$this->returnJsonError($this->lang->words['m_nodir']);
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $this->html->inline_avatar_images( $images );
|
||||
|
||||
$this->returnJsonArray( array('html' => $output) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove user's avatar
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
protected function _removeAvatar()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
try
|
||||
{
|
||||
IPSMember::getFunction()->removeAvatar( $member_id );
|
||||
|
||||
$_string = <<<EOF
|
||||
{
|
||||
'success' : true,
|
||||
}
|
||||
|
||||
EOF;
|
||||
$this->returnString( $_string );
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
switch ( $error->getMessage() )
|
||||
{
|
||||
case 'NO_MEMBER_ID':
|
||||
$this->registry->output->showError( $this->lang->words['t_noid'], 1130 );
|
||||
break;
|
||||
case 'NO_PERMISSION':
|
||||
$this->registry->output->showError( $this->lang->words['t_permav'], 2130, true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
protected function show()
|
||||
{
|
||||
@@ -171,47 +93,6 @@ EOF;
|
||||
{
|
||||
$output = $this->html->$name( $member );
|
||||
}
|
||||
else
|
||||
{
|
||||
$save_to = '';
|
||||
$div_id = '';
|
||||
$form_field = '';
|
||||
$text = '';
|
||||
$description = '';
|
||||
$method = '';
|
||||
|
||||
|
||||
switch( $name )
|
||||
{
|
||||
/*case 'inline_warn_level':
|
||||
$method = 'inline_form_generic';
|
||||
$save_to = 'save_generic&field=warn_level';
|
||||
$div_id = 'warn_level';
|
||||
$form_field = ipsRegistry::getClass('output')->formInput( "generic__field", $member['warn_level'] );
|
||||
$text = "Member Warn Level";
|
||||
$description = "Make adjustments to the member's overall warn level. This does NOT add a warn log record - you should do so manually using the 'Add New Note' link if you wish to store a log of this adjustment";
|
||||
break;*/
|
||||
|
||||
case 'inline_avatar':
|
||||
if( !$this->registry->getClass('class_permissions')->checkPermission( 'member_photo', 'members', 'members' ) )
|
||||
{
|
||||
$this->returnJsonError($this->lang->words['m_nopermban']);
|
||||
}
|
||||
|
||||
$form = array();
|
||||
$form['avatar_url'] = ipsRegistry::getClass('output')->formInput( "avatar_url", $member['avatar_type'] == 'url' ? $member['avatar_location'] : '' );
|
||||
|
||||
$av_categories = array_merge( array( 0 => array( 0, $this->lang->words['m_selectcat'] ) ), IPSMember::getFunction()->getHostedAvatarCategories() );
|
||||
|
||||
$output = $this->html->inline_avatar_selector( $member, $av_categories );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! $output AND $method AND method_exists( $this->html, $method ) )
|
||||
{
|
||||
$output = $this->html->$method( $member, $save_to, $div_id, $form_field, $text, $description );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Print...
|
||||
|
||||
Reference in new issue
Block a user