Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,19 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Task: Sends teh bulk mail of course
|
||||
* Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $LastChangedDate: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 3887 $
|
||||
* @version $Rev: 7007 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -27,7 +28,6 @@ class task_item
|
||||
/**
|
||||
* Parent task manager class
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $class;
|
||||
@@ -35,7 +35,6 @@ class task_item
|
||||
/**
|
||||
* This task data
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $task = array();
|
||||
@@ -43,7 +42,6 @@ class task_item
|
||||
/**
|
||||
* Prevent logging
|
||||
*
|
||||
* @access protected
|
||||
* @var boolean
|
||||
*/
|
||||
protected $restrict_log = false;
|
||||
@@ -51,7 +49,6 @@ class task_item
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
@@ -60,13 +57,14 @@ class task_item
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @param object Parent task class
|
||||
* @param array This task data
|
||||
@@ -92,7 +90,6 @@ class task_item
|
||||
/**
|
||||
* Run this task
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function runTask()
|
||||
@@ -103,8 +100,8 @@ class task_item
|
||||
|
||||
define( 'IN_ACP', 1 );
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/modules_admin/bulkmail/bulkmail.php' );
|
||||
$bulkmail = new admin_members_bulkmail_bulkmail();
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'members' ) . '/modules_admin/bulkmail/bulkmail.php', 'admin_members_bulkmail_bulkmail' );
|
||||
$bulkmail = new $classToLoad();
|
||||
$bulkmail->makeRegistryShortcuts( $this->registry );
|
||||
$bulkmail->mailSendProcess();
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Task: Sends Mobile Notifications
|
||||
* Last Updated: $LastChangedDate$
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author$
|
||||
* @copyright (c) 2001 - 2010 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev$
|
||||
*/
|
||||
|
||||
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
|
||||
{
|
||||
/**
|
||||
* Parent task manager class
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $class;
|
||||
|
||||
/**
|
||||
* This task data
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $task = array();
|
||||
|
||||
/**
|
||||
* Prevent logging
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $restrict_log = false;
|
||||
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @param object Parent task class
|
||||
* @param array This task data
|
||||
* @return 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->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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run this task
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function runTask()
|
||||
{
|
||||
/* INIT */
|
||||
$maxNotificationsToProcess = 250;
|
||||
$forum = urlencode( $this->settings['board_name'] );
|
||||
|
||||
/* Get the file managemnet class */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
||||
$query = new $classToLoad();
|
||||
$query->use_sockets = 1;
|
||||
|
||||
/* Get waiting notifications */
|
||||
$this->DB->build( array(
|
||||
'select' => 'n.*',
|
||||
'from' => array( 'mobile_notifications' => 'n' ),
|
||||
'where' => 'n.notify_sent=0',
|
||||
'order' => 'n.notify_date ASC',
|
||||
'limit' => array( 0, $maxNotificationsToProcess ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.ips_mobile_token',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'n.member_id=m.member_id',
|
||||
'type' => 'left',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
$_sentIds = array();
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
/* VARS */
|
||||
$ipsToken = $r['ips_mobile_token'];
|
||||
$message = urlencode( strip_tags( $r['notify_title'] ) );
|
||||
|
||||
if( ! $ipsToken || ! $message )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Query the api */
|
||||
$response = '';
|
||||
|
||||
/* Save the ID */
|
||||
$_sentIds[] = $r['id'];
|
||||
}
|
||||
|
||||
/* Update the table */
|
||||
if( count( $_sentIds ) )
|
||||
{
|
||||
$this->DB->update( 'mobile_notifications', array( 'notify_sent' => 1 ), 'id IN ('.implode( ',', $_sentIds ).')' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->appendTaskLog( $this->task, $this->lang->words['task_mobileNotifications'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->unlockTask( $this->task );
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Task: Removes locked membes who are unlocked
|
||||
* Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* 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.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 3887 $
|
||||
* @version $Rev: 5713 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Task: Removes validating members over configured time
|
||||
* Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* 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.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 3887 $
|
||||
* @version $Rev: 5713 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Task: Update the profile views counter
|
||||
* Last Updated: $LastChangedDate: 2010-11-17 08:50:12 -0500 (Wed, 17 Nov 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @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: 7206 $
|
||||
*/
|
||||
|
||||
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
|
||||
{
|
||||
/**
|
||||
* Parent task manager class
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $class;
|
||||
|
||||
/**
|
||||
* This task data
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $task = array();
|
||||
|
||||
/**
|
||||
* Prevent logging
|
||||
*
|
||||
* @access protected
|
||||
* @var boolean
|
||||
*/
|
||||
protected $restrict_log = false;
|
||||
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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->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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run this task
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function runTask()
|
||||
{
|
||||
$counter = 0;
|
||||
$_sync = time() - 10800;
|
||||
$_active = time() - ( 86400 * 14 );
|
||||
$members = array();
|
||||
|
||||
if ( IPSLib::fbc_enabled() !== TRUE && IPSLib::twitter_enabled() !== TRUE )
|
||||
{
|
||||
$this->class->appendTaskLog( $this->task, "Nothing to update" );
|
||||
$this->class->unlockTask( $this->task );
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Fetch members
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'member_id',
|
||||
'from' => 'members',
|
||||
'where' => '( (twitter_id != \'\' AND tc_lastsync < ' . $_sync .') OR (fb_uid > 0 AND fb_lastsync < ' . $_sync . ') ) AND last_visit > ' . $_active,
|
||||
'order' => 'last_visit DESC',
|
||||
'limit' => array( 0, 100 ) ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$members[] = $row['member_id'];
|
||||
}
|
||||
|
||||
$members = IPSMember::load( $members );
|
||||
|
||||
foreach( $members as $member )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Facebook Sync
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSLib::fbc_enabled() === TRUE )
|
||||
{
|
||||
if ( ! empty( $member['fb_uid'] ) )
|
||||
{
|
||||
/* We have a linked member and options, so check if they haven't sync'd in 24 hours and have been active in the past 90 days... */
|
||||
try
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php' );
|
||||
$facebook = new facebook_connect( ipsRegistry::instance(), null, null, true );
|
||||
|
||||
$_member = $facebook->syncMember( $member, $member['fb_token'], $member['fb_uid'] );
|
||||
|
||||
$counter++;
|
||||
|
||||
if ( $_member AND is_array( $_member ) )
|
||||
{
|
||||
$member = $_member;
|
||||
unset( $_member );
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch( $msg )
|
||||
{
|
||||
case 'NOT_LINKED':
|
||||
case 'NO_MEMBER':
|
||||
case 'FACEBOOK_NO_APP_ID':
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Twitter Sync
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSLib::twitter_enabled() === TRUE )
|
||||
{
|
||||
if ( ! empty( $member['twitter_id'] ) and ! empty( $member['tc_bwoptions'] ) )
|
||||
{
|
||||
/* We have a linked member and options, so check if they haven't sync'd in 3 hours and have been active in the past 90 days... */
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/twitter/connect.php' );
|
||||
$twitter = new twitter_connect( ipsRegistry::instance() );
|
||||
|
||||
try
|
||||
{
|
||||
$_member = $twitter->syncMember( $member );
|
||||
|
||||
$counter++;
|
||||
|
||||
if ( $_member AND is_array( $_member ) )
|
||||
{
|
||||
$member = $_member;
|
||||
unset( $_member );
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch( $msg )
|
||||
{
|
||||
case 'NOT_LINKED':
|
||||
case 'NO_MEMBER':
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Log to log table - modify but dont delete
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->appendTaskLog( $this->task, "Updated " . $counter );
|
||||
|
||||
//-----------------------------------------
|
||||
// Unlock Task: DO NOT MODIFY!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class->unlockTask( $this->task );
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Task: Update the profile views counter
|
||||
* Last Updated: $LastChangedDate: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* 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.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 3887 $
|
||||
* @version $Rev: 5713 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
Reference in new issue
Block a user