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,12 +3,12 @@
* @file plugin_warn.php Moderator control panel plugin: show latest warnings
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since 2/14/2011
* $LastChangedDate: 2011-03-09 17:51:33 -0500 (Wed, 09 Mar 2011) $
* @version v3.2.3
* $Revision: 8003 $
* $LastChangedDate: 2011-12-14 12:27:41 -0500 (Wed, 14 Dec 2011) $
* @version v3.3.4
* $Revision: 10000 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -123,25 +123,37 @@ class plugin_members_warn
{
return '';
}
//-----------------------------------------
// Load reasons
//-----------------------------------------
$reasons = array();
$this->DB->build( array( 'select' => '*', 'from' => 'members_warn_reasons', 'order' => 'wr_order' ) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$reasons[ $row['wr_id'] ] = $row;
}
//-----------------------------------------
// Get last 10 warnings
//-----------------------------------------
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'warn_logs' ) );
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'members_warn_logs' ) );
$warnings = array();
$this->DB->build( array(
'select' => 'w.*',
'from' => array( 'warn_logs' => 'w' ),
'order' => 'w.wlog_date DESC',
'from' => array( 'members_warn_logs' => 'w' ),
'order' => 'w.wl_date DESC',
'limit' => array( $st, 10 ),
'add_join' => array(
array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=w.wlog_mid',
'where' => 'm.member_id=w.wl_member',
'type' => 'left',
),
array(
@@ -151,9 +163,9 @@ class plugin_members_warn
'type' => 'left',
),
array(
'select' => 'mm.member_id as punisher_id, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
'select' => 'mm.member_id as punisher_id, mm.member_group_id as punisher_group, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
'from' => array( 'members' => 'mm' ),
'where' => 'mm.member_id=w.wlog_addedby',
'where' => 'mm.member_id=w.wl_moderator',
'type' => 'left',
),
array(
@@ -168,31 +180,18 @@ class plugin_members_warn
while( $r = $this->DB->fetch($outer) )
{
if ( strstr( $r['wlog_notes'], '<content>' ) )
{
$raw = preg_match( "#<content>(.+?)</content>#is", $r['wlog_notes'], $match );
}
else
{
$_array = unserialize( $r['wlog_notes'] );
if ( is_array( $_array ) AND $_array['content'] )
{
$match[1] = $_array['content'];
}
}
/* Sort out punisher */
$r['punisherMember'] = array( 'member_id' => $r['punisher_id'],
'member_group_id' => $r['punisher_group'],
'members_display_name' => $r['punisher_name'],
'members_seo_name' => $r['punisher_seo_name']
);
IPSText::getTextClass( 'bbcode' )->parse_smilies = 1;
IPSText::getTextClass( 'bbcode' )->parse_html = 0;
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;
IPSText::getTextClass( 'bbcode' )->parsing_section = 'warn';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $r['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $r['mgroup_others'];
$r['content'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $match[1] );
$r['punisher_photo'] = IPSMember::buildProfilePhoto( array( 'pp_main_photo' => $r['punisher_check'], 'pp_thumb_photo' => $r['punisher_photo'], 'pp_thumb_width' => $r['punisher_width'], 'pp_thumb_height' => $r['punisher_height'] ), 'mini' );
$warnings[] = IPSMember::buildDisplayData( $r );
$r['wl_reason'] = $r['wl_reason'] ? $reasons[ $r['wl_reason'] ]['wr_name'] : '--';
$warnings[] = IPSMember::buildDisplayData( $r, array( 'reputation' => 0, 'warn' => 0 ) );
}
//-----------------------------------------