Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

@@ -1,21 +1,14 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Task: Removes validating members over configured time
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 5713 $
* @file removevalidating.php Task to remove validating members over configured time
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: ips_terabyte $
* @since -
* $LastChangedDate: 2011-02-08 17:20:18 -0500 (Tue, 08 Feb 2011) $
* @version v3.2.3
* $Revision: 7750 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -24,69 +17,57 @@ if ( ! defined( 'IN_IPB' ) )
exit();
}
/**
*
* @class task_item
* @brief Task to remove validating members over configured time
*
*/
class task_item
{
/**
* Parent task manager class
* Object that stores the parent task manager class
*
* @access protected
* @var object
* @var $class
*/
protected $class;
/**
* This task data
*
* @access protected
* @var array
*/
protected $task = array();
/**
* Prevent logging
*
* @access protected
* @var boolean
*/
protected $restrict_log = false;
/**#@+
/**
* Array that stores the task data
*
* @var $task
*/
protected $task = array();
/**
* Registry Object Shortcuts
*
* @access protected
* @var object
* @var $registry
* @var $DB
* @var $settings
* @var $lang
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $cache;
/**#@-*/
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @param object Parent task class
* @param array This task data
* @return void
* @param object $registry Registry object
* @param object $class Task manager class object
* @param array $task Array with the task data
* @return @e void
*/
public function __construct( ipsRegistry $registry, $class, $task )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->settings =& $this->registry->fetchSettings();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->class = $class;
$this->task = $task;
}
@@ -94,33 +75,28 @@ class task_item
/**
* Run this task
*
* @access public
* @return void
* @return @e void
*/
public function runTask()
{
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
$mids = array();
$vids = array();
$emails = array();
// If enabled, remove validating new_reg members & entries from members table
if ( intval($this->settings['validate_day_prune']) > 0 )
{
/* Init vars */
$mids = array();
$vids = array();
$emails = array();
$less_than = time() - $this->settings['validate_day_prune'] * 86400;
$this->DB->build( array( 'select' => 'v.vid, v.member_id',
'from' => array( 'validating' => 'v' ),
'where' => 'v.new_reg=1 AND v.coppa_user<>1 AND v.entry_date < '.$less_than.' AND v.lost_pass<>1',
'add_join' => array( 0 => array( 'select' => 'm.posts, m.member_group_id, m.email',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=v.member_id',
'type' => 'left'
) )
) );
/* Get members from DB */
$this->DB->build( array( 'select' => 'v.vid, v.member_id',
'from' => array( 'validating' => 'v' ),
'where' => 'v.new_reg=1 AND v.coppa_user<>1 AND v.entry_date < '.$less_than.' AND v.lost_pass<>1 AND v.user_verified=0',
'add_join' => array( array( 'select' => 'm.posts, m.member_group_id, m.email',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=v.member_id',
'type' => 'left' ) )
) );
$outer = $this->DB->execute();
while( $i = $this->DB->fetch($outer) )
@@ -150,6 +126,7 @@ class task_item
// Log to log table - modify but dont delete
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
$this->class->appendTaskLog( $this->task, sprintf( $this->lang->words['task_removevalidating'], count($mids) ) );
}
@@ -159,5 +136,4 @@ class task_item
$this->class->unlockTask( $this->task );
}
}