Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| 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-14 22:42:46 +0100 (Fri, 14 Oct 2005) $
|
||||
| > $Revision: 52 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > TASK SCRIPT: Update Views
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: Monday 9th May 2005 (12:06)
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//-----------------------------------------
|
||||
// THIS TASKS OPERATIONS:
|
||||
// Imports awaiting RSS articles
|
||||
//+----------------------------------------
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class task_item
|
||||
{
|
||||
var $class = "";
|
||||
var $root_path = "";
|
||||
var $task = "";
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Our 'auto_run' function
|
||||
// ADD CODE HERE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function run_task()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
define( 'IN_ACP', 1 );
|
||||
|
||||
$feeds_to_update = array();
|
||||
|
||||
$time = time();
|
||||
$t_minus_30 = time() - ( 30 * 60 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Got any to update?
|
||||
// 30 mins is RSS friendly.
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_enabled=1 AND rss_import_last_import <= '.$t_minus_30 ) );
|
||||
$rss_main_query = $this->ipsclass->DB->exec_query();
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows( $rss_main_query ) )
|
||||
{
|
||||
require_once( ROOT_PATH . 'sources/action_admin/rssimport.php' );
|
||||
$admin = new ad_rssimport();
|
||||
$admin->ipsclass =& $this->ipsclass;
|
||||
|
||||
while( $rss_feed = $this->ipsclass->DB->fetch_row( $rss_main_query ) )
|
||||
{
|
||||
$this_check = time() - ( $rss_feed['rss_import_time'] * 60 );
|
||||
|
||||
if ( $rss_feed['rss_import_last_import'] <= $this_check )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Set the feeds we need to update...
|
||||
//-----------------------------------------
|
||||
|
||||
$feeds_to_update[] = $rss_feed['rss_import_id'];
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Do the update now...
|
||||
//-----------------------------------------
|
||||
if ( count( $feeds_to_update ) )
|
||||
{
|
||||
$admin->rssimport_rebuild_cache( implode( ",", $feeds_to_update), 0, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->append_task_log( $this->task, 'RSS Èìïîðò çàâåðøåí ('. count($feeds_to_update) .')' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->unlock_task( $this->task );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// register_class
|
||||
// LEAVE ALONE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function register_class(&$class)
|
||||
{
|
||||
$this->class = $class;
|
||||
$this->ipsclass =& $class->ipsclass;
|
||||
$this->root_path = $this->class->root_path;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// pass_task
|
||||
// LEAVE ALONE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function pass_task( $this_task )
|
||||
{
|
||||
$this->task = $this_task;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user