Version 3.4.8

This commit is contained in:
Neo committed 2025-12-19 00:42:42 -08:00
1 parent b45ea0dffb
commit c603205a25
1398 files changed
+36675 -31023

No files matched your search

@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* Moderator actions
* Last Updated: $Date: 2013-10-28 17:58:20 -0400 (Mon, 28 Oct 2013) $
* Last Updated: $Date: 2015-02-23 06:21:10 -0500 (Mon, 23 Feb 2015) $
* </pre>
* File Created By: Matt Mecham
*
* @author $Author: rashbrook $
* @author $Author: stuarts $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Revision: 12396 $
* @version $Revision: 12602 $
*
*/
@@ -633,15 +633,15 @@ class classPost
// OPEN...
//-----------------------------------------
$_POST['open_time_date'] = isset($_POST['open_time_date']) ? $_POST['open_time_date'] : NULL;
$_POST['open_time_time'] = isset($_POST['open_time_time']) ? $_POST['open_time_time'] : NULL;
$_POST['close_time_date'] = isset($_POST['close_time_date']) ? $_POST['close_time_date'] : NULL;
$_POST['close_time_time'] = isset($_POST['close_time_time']) ? $_POST['close_time_time'] : NULL;
$this->request['open_time_date'] = isset($this->request['open_time_date']) ? $this->request['open_time_date'] : NULL;
$this->request['open_time_time'] = isset($this->request['open_time_time']) ? $this->request['open_time_time'] : NULL;
$this->request['close_time_date'] = isset($this->request['close_time_date']) ? $this->request['close_time_date'] : NULL;
$this->request['close_time_time'] = isset($this->request['close_time_time']) ? $this->request['close_time_time'] : NULL;
if ( $this->can_set_open_time AND $_POST['open_time_date'] AND $_POST['open_time_time'] )
if ( $this->can_set_open_time AND $this->request['open_time_date'] AND $this->request['open_time_time'] )
{
$date = strtotime( $_POST['open_time_date'] );
list( $hour , $minute ) = explode( ":", $_POST['open_time_time'] );
$date = strtotime( $this->request['open_time_date'] );
list( $hour , $minute ) = explode( ":", $this->request['open_time_time'] );
if ( $date )
{
@@ -654,10 +654,10 @@ class classPost
// CLOSE...
//-----------------------------------------
if ( $this->can_set_close_time AND $_POST['close_time_date'] AND $_POST['close_time_time'] )
if ( $this->can_set_close_time AND $this->request['close_time_date'] AND $this->request['close_time_time'] )
{
$date = strtotime( $_POST['close_time_date'] );
list( $hour , $minute ) = explode( ":", $_POST['close_time_time'] );
$date = strtotime( $this->request['close_time_date'] );
list( $hour , $minute ) = explode( ":", $this->request['close_time_time'] );
if ( $date )
{
@@ -968,10 +968,13 @@ class classPost
$parser = new $classToLoad();
$parser->testForParsingLimits( $new_post );
/* Assign to variable instead of passing reference, PHP Strict standards */
$errors = $parser->getErrors();
if ( is_array( $parser->getErrors() ) && count( $parser->getErrors() ) )
if ( is_array( $errors ) && count( $errors ) )
{
$this->_postErrors = 'merge_' . array_pop( $parser->getErrors() );
$this->_postErrors = 'merge_' . array_pop( $errors );
$this->showReplyForm();
return;
}
@@ -2191,13 +2194,16 @@ EOF;
}
else
{
/* Remove the poll */
$this->DB->delete( 'polls', 'tid=' . $topic['tid'] );
$this->DB->delete( 'voters', 'tid=' . $topic['tid'] );
/* Update topics table later */
$updateTopicTable['poll_state'] = 0;
$updateTopicTable['last_vote'] = 0;
/* Remove the poll... but only if we aren't on mobile (see ticket 897586) */
if ( $this->registry->output->getAsMobileSkin() !== TRUE )
{
$this->DB->delete( 'polls', 'tid=' . $topic['tid'] );
$this->DB->delete( 'voters', 'tid=' . $topic['tid'] );
/* Update topics table later */
$updateTopicTable['poll_state'] = 0;
$updateTopicTable['last_vote'] = 0;
}
}
}
@@ -2236,7 +2242,7 @@ EOF;
$this->DB->update( 'forums', $_forumUpdate, 'id=' . $this->getForumData('id') );
}
if ( ($this->moderator['edit_topic'] == 1) OR ( $this->getAuthor('g_is_supmod') == 1 ) )
if ( (isset( $this->moderator['edit_topic'] ) AND $this->moderator['edit_topic'] == 1) OR ( $this->getAuthor('g_is_supmod') == 1 ) )
{
$this->DB->insert( 'moderator_logs', array(
'forum_id' => $this->getForumData('id'),
@@ -2952,7 +2958,7 @@ EOF;
$ignored = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'ignored_users',
'where' => 'ignore_ignore_id=' . $this->memberData['member_id'] . ' AND ignore_owner_id=' . $_toMember['member_id'] . ' AND ignore_topics = 1' ) );
if ( $this->registry->getClass('topics')->canView( $topic, $_toMember ) && ! $ignored )
{
if ( ( ! isset( $seen[ $_quoted['author_id'] ] ) ) && $_quoted['author_id'] && ( $_quoted['author_id'] != $this->getAuthor('member_id') ) and ( ! in_array( $_quoted['author_id'], $membersToSkip ) ) )
@@ -3072,7 +3078,7 @@ EOF;
}
else
{
$_POST['votes'] = isset($_POST['votes']) ? $_POST['votes'] : 0;
$_POST['votes'] = isset($_POST['votes']) ? $_POST['votes'] : array();
$questions[ $question_id ]['votes'][ $choice_id ] = intval( $_POST['votes'][ $question_id.'_'.$choice_id ] );
}
@@ -3367,7 +3373,7 @@ EOF;
$dbs = array( 'last_title' => $topic['title'],
'seo_last_title' => IPSText::makeSeoTitle( $topic['title'] ),
'last_id' => $topic['tid'],
'last_post' => IPS_UNIX_TIME_NOW,
'last_post' => ( $this->getDate() ? $this->getDate() : IPS_UNIX_TIME_NOW ),
'last_poster_name' => $this->getAuthor('member_id') ? $this->getAuthor('members_display_name') : $this->request['UserName'],
'seo_last_name' => IPSText::makeSeoTitle( $this->getAuthor('member_id') ? $this->getAuthor('members_display_name') : $this->request['UserName'] ),
'last_poster_id' => $this->getAuthor('member_id'),