Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

@@ -1,19 +1,19 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Moderator actions
* Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $
* Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 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 Forums
* @link http://www.iinvisionpower.com
* @version $Revision: 5190 $
*
* @link http://www.invisionpower.com
* @version $Revision: 7003 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -27,7 +27,6 @@ class digestLibrary
/**
* Digest time
*
* @access public
* @var string daily|weekly
*/
public $digest_time = 'daily';
@@ -35,7 +34,6 @@ class digestLibrary
/**
* Digest type
*
* @access public
* @var string topic|forum
*/
public $digest_type = 'topic';
@@ -43,7 +41,6 @@ class digestLibrary
/**
* Midnight time
*
* @access public
* @var integer Timestamp
*/
public $midnight = 0;
@@ -51,7 +48,6 @@ class digestLibrary
/**
* Last week timestamp
*
* @access public
* @var integer Timestamp
*/
public $last_week = 0;
@@ -59,7 +55,6 @@ class digestLibrary
/**
* Yesterday timestamp
*
* @access public
* @var integer Timestamp
*/
public $last_day = 0;
@@ -67,7 +62,6 @@ class digestLibrary
/**
* Last time timestamp
*
* @access public
* @var integer Timestamp
*/
public $last_time = 0;
@@ -75,7 +69,6 @@ class digestLibrary
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $registry;
@@ -84,13 +77,14 @@ class digestLibrary
protected $request;
protected $lang;
protected $member;
protected $cache;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* Constructor
*
* @access public
* @param object Registry reference
* @return void
*/
@@ -110,8 +104,8 @@ class digestLibrary
/* Check for class_forums */
if( ! $this->registry->isClassLoaded( 'class_forums' ) )
{
require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" );
$this->registry->setClass( 'class_forums', new class_forums( $registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' );
$this->registry->setClass( 'class_forums', new $classToLoad( $registry ) );
$this->registry->strip_invisible = 0;
$this->registry->class_forums->forumsInit();
}
@@ -144,7 +138,6 @@ class digestLibrary
/**
* Run the digest
*
* @access public
* @return void
*/
public function runDigest()
@@ -164,11 +157,17 @@ class digestLibrary
/**
* Run the digest
*
* @access private
* @return void
*/
private function _sendTopicDigest()
{
//-----------------------------------------
// Notifications library
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
$notifyLibrary = new $classToLoad( $this->registry );
//-----------------------------------------
// Get all posts / topics
//-----------------------------------------
@@ -293,28 +292,33 @@ class digestLibrary
if ( $others_posted )
{
$count++;
$trids[ $t['trid'] ] = intval( $t['trid'] );
//-----------------------------------------
// Send email...
// Send notification...
//-----------------------------------------
IPSText::getTextClass( 'email' )->getTemplate( $subject, $t['language'] );
IPSText::getTextClass('email')->getTemplate( $subject, $t['language'] );
IPSText::getTextClass( 'email' )->buildMessage( array(
'TOPIC_ID' => $t['tid'],
'FORUM_ID' => $t['forum_id'],
'TITLE' => $topic_title,
'NAME' => $t['members_display_name'],
'CONTENT' => $main_output,
'TOPIC_ID' => $t['tid'],
'FORUM_ID' => $t['forum_id'],
'TITLE' => $topic_title,
'NAME' => $t['members_display_name'],
'CONTENT' => $main_output,
) );
$notifyLibrary->setMember( $t );
$notifyLibrary->setFrom( array() );
$notifyLibrary->setNotificationKey( 'new_reply' );
$notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message );
$notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject );
$this->DB->insert( 'mail_queue', array( 'mail_to' => $t['email'],
'mail_date' => time(),
'mail_from' => '',
'mail_subject' => IPSText::getTextClass( 'email' )->subject,
'mail_content' => IPSText::getTextClass( 'email' )->message ) );
try
{
$notifyLibrary->sendNotification();
}
catch( Exception $e ){}
}
}
@@ -324,25 +328,22 @@ class digestLibrary
{
$this->DB->update( 'tracker', array( 'last_sent' => time() ), 'trid IN (' . implode( ',', $trids ) . ')' );
}
$cache = ipsRegistry::cache()->getCache('systemvars');
$cache['mail_queue'] += $count;
//-----------------------------------------
// Update cache with remaning email count
//-----------------------------------------
ipsRegistry::cache()->setCache( 'systemvars', $cache, array( 'array' => 1, 'donow' => 1 ) );
}
/**
* Run the digest
*
* @access private
* @return void
*/
private function _sendForumDigest()
{
//-----------------------------------------
// Notifications library
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
$notifyLibrary = new $classToLoad( $this->registry );
//-----------------------------------------
// Get all posts / topics
//-----------------------------------------
@@ -456,27 +457,32 @@ class digestLibrary
if ( $others_posted )
{
$count++;
$frids[ $t['frid'] ] = intval( $t['frid'] );
//-----------------------------------------
// Send email...
// Send notification...
//-----------------------------------------
IPSText::getTextClass( 'email' )->getTemplate( $subject, $t['language'] );
IPSText::getTextClass('email')->getTemplate( $subject, $t['language'] );
IPSText::getTextClass( 'email' )->buildMessage( array(
'FORUM_ID' => $t['forum_id'],
'FORUM_NAME' => $forum_name,
'NAME' => $t['members_display_name'],
'CONTENT' => $main_output,
) );
) );
$notifyLibrary->setMember( $t );
$notifyLibrary->setFrom( array() );
$notifyLibrary->setNotificationKey( 'new_topic' );
$notifyLibrary->setNotificationText( IPSText::getTextClass('email')->message );
$notifyLibrary->setNotificationTitle( IPSText::getTextClass('email')->subject );
$this->DB->insert( 'mail_queue', array( 'mail_to' => $t['email'],
'mail_date' => time(),
'mail_from' => '',
'mail_subject' => IPSText::getTextClass( 'email' )->subject,
'mail_content' => IPSText::getTextClass( 'email' )->message ) );
try
{
$notifyLibrary->sendNotification();
}
catch( Exception $e ){}
}
}
@@ -486,15 +492,5 @@ class digestLibrary
{
$this->DB->update( 'forum_tracker', array( 'last_sent' => time() ), 'frid IN (' . implode( ',', $frids ) . ')' );
}
$cache = ipsRegistry::cache()->getCache('systemvars');
$cache['mail_queue'] += $count;
//-----------------------------------------
// Update cache with remaning email count
//-----------------------------------------
ipsRegistry::cache()->setCache( 'systemvars', $cache, array( 'array' => 1, 'donow' => 1 ) );
}
}
@@ -7,19 +7,21 @@ if ( ! defined( 'IN_ACP' ) )
}
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Admin forum functions library
* Last Updated: $Date: 2009-09-29 17:59:02 -0400 (Tue, 29 Sep 2009) $
* Last Updated: $Date: 2010-05-20 17:04:12 -0400 (Thu, 20 May 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 Forums
* @link http://www.iinvisionpower.com
* @link http://www.invisionpower.com
* @since 26th January 2004
* @version $Rev: 5178 $
* @version $Rev: 6344 $
*
*/
class admin_forum_functions extends class_forums
@@ -238,22 +240,6 @@ class admin_forum_functions extends class_forums
$this->registry->output->html .= $this->html->forumWrapper( $content, $r, $show_buttons );
}
/**
* End Category
*
* @access public
* @param array $r
* @return void
**/
public function forum_end_cat($r=array())
{
// NO LONGER USED?
if ( $this->type == 'manage' )
{
$this->registry->output->html .= $this->registry->output->end_table();
}
}
/**
* List all forums
*
File diff suppressed because it is too large. Load diff
@@ -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 -&gt; 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>
@@ -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 -&gt; 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>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,20 +1,20 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Posting display formatting methods
* Last Updated: $Date: 2009-11-10 18:07:22 -0500 (Tue, 10 Nov 2009) $
* Last Updated: $Date: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $
* </pre>
* File Created By: Matt Mecham
*
* @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 Forums
* @link http://www.iinvisionpower.com
* @version $Revision: 5345 $
*
* @link http://www.invisionpower.com
* @version $Revision: 7003 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -63,7 +63,6 @@ class classPostForms extends classPost
// Set up
//-----------------------------------------
$output = '';
$extraData = array();
$errors = '';
@@ -79,9 +78,14 @@ class classPostForms extends classPost
}
catch( Exception $error )
{
throw new Exception( $error->getMessage() );
$e = $error->getMessage();
if ( $e != 'NO_POSTING_PPD' )
{
throw new Exception( $e );
}
}
//-----------------------------------------
// Appending a reason for the edit?
//-----------------------------------------
@@ -147,7 +151,7 @@ class classPostForms extends classPost
if ( $this->_postErrors )
{
$errors = $this->lang->words[ $this->_postErrors ];
$errors = isset($this->lang->words[ $this->_postErrors ]) ? $this->lang->words[ $this->_postErrors ] : $this->_postErrors;
}
$html = $this->registry->getClass('output')->getTemplate('editors')->ajaxEditBox( $postContent, $this->getPostID(), $errors, $extraData );
@@ -204,7 +208,16 @@ class classPostForms extends classPost
}
catch( Exception $error )
{
throw new Exception( $error->getMessage() );
$e = $error->getMessage();
if ( $formType == 'edit' AND $e == 'NO_POSTING_PPD' )
{
}
else
{
throw new Exception( $e );
}
}
//-----------------------------------------
@@ -299,7 +312,7 @@ class classPostForms extends classPost
if ( $this->_postErrors )
{
$output .= $this->registry->getClass('output')->getTemplate('post')->errors( $this->lang->words[ $this->_postErrors ] );
$output .= $this->registry->getClass('output')->getTemplate('post')->errors( isset($this->lang->words[ $this->_postErrors ]) ? $this->lang->words[ $this->_postErrors ] : $this->_postErrors );
}
if ( $this->getIsPreview() )
@@ -320,15 +333,19 @@ class classPostForms extends classPost
/* status from mod posts */
$this->registry->getClass('class_forums')->checkGroupPostPerDay( $this->getAuthor(), TRUE );
$_statusMsg[] = $this->registry->getClass('class_forums')->ppdStatusMessage;
if ( $formType != 'edit' AND $this->registry->getClass('class_forums')->ppdStatusMessage )
{
$_statusMsg[] = $this->registry->getClass('class_forums')->ppdStatusMessage;
}
$_statusMsg[] = $this->registry->getClass('class_forums')->fetchPostModerationStatusMessage( $this->getAuthor(), $this->getForumData(), $topic, $formType );
//-----------------------------------------
// Load attachments so we get some stats
//-----------------------------------------
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
$class_attach = new class_attach( $this->registry );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
$class_attach = new $classToLoad( $this->registry );
$class_attach->type = 'post';
$class_attach->attach_post_key = $this->post_key;
$class_attach->init();
@@ -591,7 +608,6 @@ class classPostForms extends classPost
// INIT
//-----------------------------------------
$output = '';
$cached_members = array();
$attach_pids = array();
$posts = array();
@@ -705,8 +721,8 @@ class classPostForms extends classPost
// Grab render attach class
//-----------------------------------------
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach( $this->registry );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
$this->class_attach = new $classToLoad( $this->registry );
$this->class_attach->attach_post_key = '';
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic' ), 'forums' );
@@ -743,7 +759,7 @@ class classPostForms extends classPost
'sig' => 'checked="checked"',
'emo' => 'checked="checked"',
'html' => array(),
'tra' => $this->getAuthor('auto_track') ? 'checked="checked"' : ''
'tra' => ( $this->getAuthor('auto_track') OR $this->getSettings('enableTracker') ) ? 'checked="checked"' : ''
);
if ( ! $this->getSettings('enableSignature') )
@@ -857,7 +873,7 @@ class classPostForms extends classPost
if ($can_pin AND !$topic['pinned'] )
{
$selected = ($this->getModOptions() == 'pin') ? " selected='selected'" : '';
$html .= "<option value='pin'{$selected}>".$this->lang->words['mod_pin']."</option>";
}
else if ($can_unpin AND $topic['pinned'] )
@@ -939,7 +955,8 @@ class classPostForms extends classPost
{
if ( isset($topic['topic_open_time']) AND $topic['topic_open_time'] )
{
$date = IPSTime::unixstamp_to_human( $topic['topic_open_time'] );
# Bug 23258 - add on TZ as we take this off when saving time
$date = IPSTime::unixstamp_to_human( $topic['topic_open_time'] + $this->registry->class_localization->getTimeOffset() );
$mytimes['open_date'] = sprintf("%02d.%02d.%04d", $date['day'], $date['month'], $date['year'] );
$mytimes['open_time'] = sprintf("%02d:%02d" , $date['hour'] , $date['minute'] );
}
@@ -949,7 +966,8 @@ class classPostForms extends classPost
{
if ( isset($topic['topic_close_time']) AND $topic['topic_close_time'] )
{
$date = IPSTime::unixstamp_to_human( $topic['topic_close_time'] );
# Bug 23258 - add on TZ as we take this off when saving time
$date = IPSTime::unixstamp_to_human( $topic['topic_close_time'] + $this->registry->class_localization->getTimeOffset() );
$mytimes['close_date'] = sprintf("%02d.%02d.%04d", $date['day'], $date['month'], $date['year'] );
$mytimes['close_time'] = sprintf("%02d:%02d" , $date['hour'] , $date['minute'] );
}
@@ -1043,7 +1061,7 @@ class classPostForms extends classPost
{
foreach( $_POST['question'] as $id => $question )
{
$poll_questions[$id] = $question;
$poll_questions[$id] = IPSText::parseCleanValue( $question );
}
$poll_question = ipsRegistry::$request['poll_question'];
@@ -1062,7 +1080,7 @@ class classPostForms extends classPost
{
foreach( $_POST['choice'] as $id => $choice )
{
$poll_choices[ $id ] = $choice;
$poll_choices[ $id ] = IPSText::parseCleanValue( $choice );
}
}
@@ -1167,8 +1185,8 @@ class classPostForms extends classPost
// Grab render attach class
//-----------------------------------------
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach( $this->registry );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
$this->class_attach = new $classToLoad( $this->registry );
}
//-----------------------------------------
@@ -1183,5 +1201,4 @@ class classPostForms extends classPost
return $attachData[0]['html'] . $attachData[0]['attachmentHtml'];
}
}
@@ -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 -&gt; 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>
File diff suppressed because it is too large. Load diff