Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -1,101 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* @file dailydigest.php Task to send out the daily digest emails
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* @since -
|
||||
* $LastChangedDate: 2011-08-05 20:51:01 -0400 (Fri, 05 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9373 $
|
||||
*/
|
||||
|
||||
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.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @class task_item
|
||||
* @brief Task to send out the daily digest emails
|
||||
*
|
||||
*/
|
||||
class task_item
|
||||
{
|
||||
/**
|
||||
* Object that stores the parent task manager class
|
||||
*
|
||||
* @var $class
|
||||
*/
|
||||
protected $class;
|
||||
|
||||
/**
|
||||
* Array that stores the task data
|
||||
*
|
||||
* @var $task
|
||||
*/
|
||||
protected $task = array();
|
||||
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $lang
|
||||
*/
|
||||
protected $registry;
|
||||
protected $lang;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @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->lang = $this->registry->getClass('class_localization');
|
||||
|
||||
$this->class = $class;
|
||||
$this->task = $task;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run this task
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function runTask()
|
||||
{
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Send daily digests...
|
||||
//-----------------------------------------
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/digest.php', 'digestLibrary', 'forums' );
|
||||
$digest = new $classToLoad( $this->registry );
|
||||
|
||||
$digest->runDigest( 'daily', 'topic' );
|
||||
|
||||
$digest->runDigest( 'daily', 'forum' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->appendTaskLog( $this->task, $this->lang->words['task_dailydigest'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->unlockTask( $this->task );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @file dailydigest.php Task to send out the daily digest emails
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mmecham $
|
||||
* @since -
|
||||
* $LastChangedDate: 2012-03-06 09:29:21 -0500 (Tue, 06 Mar 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10393 $
|
||||
*/
|
||||
|
||||
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.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @class task_item
|
||||
* @brief Task to send out the daily digest emails
|
||||
*
|
||||
*/
|
||||
class task_item
|
||||
{
|
||||
/**
|
||||
* Object that stores the parent task manager class
|
||||
*
|
||||
* @var $class
|
||||
*/
|
||||
protected $class;
|
||||
|
||||
/**
|
||||
* Array that stores the task data
|
||||
*
|
||||
* @var $task
|
||||
*/
|
||||
protected $task = array();
|
||||
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $lang
|
||||
*/
|
||||
protected $registry;
|
||||
protected $lang;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @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->lang = $this->registry->getClass('class_localization');
|
||||
|
||||
$this->class = $class;
|
||||
$this->task = $task;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run this task
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function runTask()
|
||||
{
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Send daily digests...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/like/composite.php' );/*noLibHook*/
|
||||
|
||||
$_like = classes_like::bootstrap( 'forums','topics' );
|
||||
$_like->sendDigestNotifications( 'daily', 500 );
|
||||
|
||||
$_like = classes_like::bootstrap( 'forums','forums' );
|
||||
$_like->sendDigestNotifications( 'daily', 500 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->appendTaskLog( $this->task, $this->lang->words['task_dailydigest'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->unlockTask( $this->task );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user