Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -2,16 +2,28 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board v2.0.0
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Time: Tue, 21 Sep 2004 16:34:28 GMT
|
||||
| Release: 150aa7a702c3c8b6f6eb90ad49305d2f
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > TASK SCRIPT: Test
|
||||
@@ -28,7 +40,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -45,8 +57,6 @@ class task_item
|
||||
|
||||
function run_task()
|
||||
{
|
||||
global $DB, $ibforums, $std;
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete old subscriptions
|
||||
//-----------------------------------------
|
||||
@@ -54,21 +64,21 @@ class task_item
|
||||
$deleted = 0;
|
||||
$trids = array();
|
||||
|
||||
if ($ibforums->vars['subs_autoprune'] > 0)
|
||||
if ($this->ipsclass->vars['subs_autoprune'] > 0)
|
||||
{
|
||||
$time = time() - ($ibforums->vars['subs_autoprune'] * 86400);
|
||||
$time = time() - ($this->ipsclass->vars['subs_autoprune'] * 86400);
|
||||
|
||||
$DB->cache_add_query( 'ucp_tracker_prune', array( 'time' => $time ) );
|
||||
$DB->cache_exec_query();
|
||||
$this->ipsclass->DB->cache_add_query( 'ucp_tracker_prune', array( 'time' => $time ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
while ( $r = $DB->fetch_row() )
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$trids[] = $r['trid'];
|
||||
}
|
||||
|
||||
if (count($trids) > 0)
|
||||
{
|
||||
$DB->simple_exec_query( array( 'delete', 'tracker', 'where' => "trid IN (".implode(",",$trids).")" ) );
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'tracker', 'where' => "trid IN (".implode(",",$trids).")" ) );
|
||||
}
|
||||
|
||||
$deleted = intval( count($trids) );
|
||||
@@ -78,22 +88,28 @@ class task_item
|
||||
// Remove read topics
|
||||
//-----------------------------------------
|
||||
|
||||
$ibforums->vars['db_topic_read_cutoff'] = intval($ibforums->vars['db_topic_read_cutoff']);
|
||||
$this->ipsclass->vars['db_topic_read_cutoff'] = intval($this->ipsclass->vars['db_topic_read_cutoff']);
|
||||
|
||||
if ( $ibforums->vars['db_topic_read_cutoff'] > 0 )
|
||||
if ( $this->ipsclass->vars['db_topic_read_cutoff'] > 0 )
|
||||
{
|
||||
$time = time() - ( $ibforums->vars['db_topic_read_cutoff'] * 86400 );
|
||||
$time = time() - ( $this->ipsclass->vars['db_topic_read_cutoff'] * 86400 );
|
||||
|
||||
$DB->simple_exec_query( array( 'delete' => 'topics_read', 'where' => "read_date < $time" ) );
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'topics_read', 'where' => "read_date < $time" ) );
|
||||
|
||||
$topics_deleted = $DB->get_affected_rows();
|
||||
$topics_deleted = $this->ipsclass->DB->get_affected_rows();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->append_task_log( $this->task, "$deleted subscriptions pruned and {$topics_deleted} db read topic entries deleted" );
|
||||
$this->class->append_task_log( $this->task, "$deleted ïîäïèñîê ñêðûòî è {$topics_deleted} çàïèñåé î ïðî÷èòàííûõ òåìàõ óäàëåíî" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->unlock_task( $this->task );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -103,8 +119,8 @@ class task_item
|
||||
|
||||
function register_class(&$class)
|
||||
{
|
||||
$this->class = $class;
|
||||
|
||||
$this->class = $class;
|
||||
$this->ipsclass =& $class->ipsclass;
|
||||
$this->root_path = $this->class->root_path;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user