Version 3.4.8
This commit is contained in:
1 parent
b45ea0dffb
commit
c603205a25
1398 files changed
+36675
-31023
No files matched your search
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-02-08 17:20:18 -0500 (Tue, 08 Feb 2011) $
|
||||
* @version v3.4.6
|
||||
* @version v3.4.8
|
||||
* $Revision: 7750 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* $Author: rashbrook $
|
||||
* @since -
|
||||
* $LastChangedDate: 2012-01-13 11:28:34 -0500 (Fri, 13 Jan 2012) $
|
||||
* @version v3.4.6
|
||||
* $Revision: 10138 $
|
||||
* $LastChangedDate: 2014-08-29 15:04:48 -0400 (Fri, 29 Aug 2014) $
|
||||
* @version v3.4.8
|
||||
* $Revision: 12492 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -126,7 +126,7 @@ class task_item
|
||||
$time_cutoff = time() - 7200;
|
||||
$deadid = array();
|
||||
|
||||
$this->DB->build( array( "select" => '*', 'from' => 'attachments', 'where' => "attach_rel_id=0 AND attach_date < {$time_cutoff}" ) );
|
||||
$this->DB->build( array( "select" => '*', 'from' => 'attachments', 'where' => "attach_rel_id=0 AND attach_date < {$time_cutoff}", 'limit' => array( 0, 25 ) ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $killmeh = $this->DB->fetch() )
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: mark $
|
||||
* @since -
|
||||
* $LastChangedDate: 2012-09-18 10:15:15 -0400 (Tue, 18 Sep 2012) $
|
||||
* @version v3.4.6
|
||||
* @version v3.4.8
|
||||
* $Revision: 11344 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
IP.Board
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,11 +4,11 @@
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* $Author: stuarts $
|
||||
* @since -
|
||||
* $LastChangedDate: 2013-01-18 23:06:49 -0500 (Fri, 18 Jan 2013) $
|
||||
* @version v3.4.6
|
||||
* $Revision: 11873 $
|
||||
* $LastChangedDate: 2014-09-26 09:22:53 -0400 (Fri, 26 Sep 2014) $
|
||||
* @version v3.4.8
|
||||
* $Revision: 12514 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -31,14 +31,14 @@ class task_item
|
||||
* @var $class
|
||||
*/
|
||||
protected $class;
|
||||
|
||||
|
||||
/**
|
||||
* Array that stores the task data
|
||||
*
|
||||
* @var $task
|
||||
*/
|
||||
protected $task = array();
|
||||
|
||||
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
@@ -51,7 +51,7 @@ class task_item
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $lang;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -68,11 +68,11 @@ class task_item
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
|
||||
|
||||
$this->class = $class;
|
||||
$this->task = $task;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run this task
|
||||
*
|
||||
@@ -82,64 +82,64 @@ class task_item
|
||||
{
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_mod' ), 'forums' );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Figure out how long
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$_days = $this->settings['days_to_keep_deletions'] > 0 ? intval($this->settings['days_to_keep_deletions']) : 365;
|
||||
$_ts = time() - ( $_days * 86400 );
|
||||
$posts = 0; // Number of removed posts
|
||||
$topics = 0; // Number of removed topics
|
||||
$forums = array();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Moderator library
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' );
|
||||
$moderatorLibrary = new $classToLoad( $this->registry );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get topics
|
||||
// Get topics
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->DB->build( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => $this->registry->getClass('class_forums')->fetchTopicHiddenQuery( array( 'pdelete', 'oktoremove' ) ) . ' AND tdelete_time < ' . $_ts . ' AND ' . $this->registry->getClass('class_forums')->fetchTopicArchiveQuery( array( 'not', 'exclude' ) ),
|
||||
'limit' => array( 0, 500 ) ) );
|
||||
|
||||
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$topics++;
|
||||
$forums[ $r['forum_id'] ] = $r['forum_id'];
|
||||
|
||||
$moderatorLibrary->init( $this->registry->getClass('class_forums')->allForums[ $r['forum_id'] ], $r );
|
||||
$moderatorLibrary->topicDeleteFromDB( $r['tid'], true );
|
||||
$moderatorLibrary->topicDeleteFromDB( $r['tid'], true, true );
|
||||
$moderatorLibrary->clearModQueueTable( 'topic', $r['tid'] );
|
||||
$moderatorLibrary->addModerateLog( $r['forum_id'], $r['tid'], '', $r['title'], $this->lang->words['acp_deleted_a_topic'] );
|
||||
|
||||
|
||||
// Do we have a linked topic to remove?
|
||||
$linked_topic = $this->DB->buildAndFetch( array( 'select' => 'tid, forum_id', 'from' => 'topics', 'where' => "state='link' AND moved_to='" . $r['tid'] . '&' . $r['forum_id'] . "'" ) );
|
||||
|
||||
|
||||
if ( $linked_topic )
|
||||
{
|
||||
$this->DB->delete( 'topics', "tid=" . $linked_topic['tid'] );
|
||||
$this->DB->delete( 'topics', "tid=" . $linked_topic['tid'] );
|
||||
$forums[ $linked_topic['forum_id'] ] = $linked_topic['forum_id'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get posts
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$_ids = array();
|
||||
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'p.*',
|
||||
'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => $this->registry->getClass('class_forums')->fetchPostHiddenQuery( array( 'pdelete', 'oktoremove' ), 'p.' ) . ' AND pdelete_time < ' . $_ts,
|
||||
'limit' => array( 0, 500 ),
|
||||
@@ -148,48 +148,48 @@ class task_item
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left' ) ) ) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$posts++;
|
||||
$forums[ $r['forum_id'] ] = $r['forum_id'];
|
||||
|
||||
|
||||
$moderatorLibrary->init( $this->registry->getClass('class_forums')->allForums[ $r['forum_id'] ], $r );
|
||||
$moderatorLibrary->postDeleteFromDb( $r['pid'], true );
|
||||
$moderatorLibrary->postDeleteFromDb( $r['pid'], true, false, true );
|
||||
$moderatorLibrary->clearModQueueTable( 'post', $r['pid'] );
|
||||
|
||||
|
||||
$_ids[] = $r['pid'];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Rebuild forums and stats
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if( count($forums) )
|
||||
{
|
||||
foreach( $forums as $forum )
|
||||
{
|
||||
$moderatorLibrary->forumRecount( $forum );
|
||||
}
|
||||
|
||||
|
||||
$this->cache->rebuildCache( 'stats', 'global' );
|
||||
}
|
||||
|
||||
|
||||
if( count($_ids) )
|
||||
{
|
||||
$moderatorLibrary->addModerateLog( "", "", "", implode( ',', $_ids ), sprintf( $this->lang->words['multi_post_delete'], implode( ', ', $_ids ) ) );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->class->appendTaskLog( $this->task, sprintf( $this->lang->words['task_permadelete'], $posts, $topics ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->class->unlockTask( $this->task );
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: bfarber $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-05-20 00:17:42 -0400 (Fri, 20 May 2011) $
|
||||
* @version v3.4.6
|
||||
* @version v3.4.8
|
||||
* $Revision: 8847 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: bfarber $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
|
||||
* @version v3.4.6
|
||||
* @version v3.4.8
|
||||
* $Revision: 8754 $
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Author: ips_terabyte $
|
||||
* @since -
|
||||
* $LastChangedDate: 2012-03-19 16:54:21 -0400 (Mon, 19 Mar 2012) $
|
||||
* @version v3.4.6
|
||||
* @version v3.4.8
|
||||
* $Revision: 10447 $
|
||||
*/
|
||||
|
||||
|
||||
Reference in new issue
Block a user