Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -37,7 +37,7 @@ class _Topic extends \IPS\Content\Item implements
|
||||
\IPS\Content\Anonymous,
|
||||
\IPS\Content\FuturePublishing
|
||||
{
|
||||
use \IPS\Content\Reactable, \IPS\Content\Reportable, \IPS\Content\Statistics, \IPS\Content\Solvable { toggleSolveComment as protected _toggleSolveComment; }
|
||||
use \IPS\forums\Topic\LiveTopic, \IPS\Content\Reactable, \IPS\Content\Reportable, \IPS\Content\Statistics, \IPS\Content\Solvable { toggleSolveComment as protected _toggleSolveComment; }
|
||||
|
||||
/**
|
||||
* @brief Not archived
|
||||
@@ -177,11 +177,6 @@ class _Topic extends \IPS\Content\Item implements
|
||||
* @brief Setting name for show_meta
|
||||
*/
|
||||
public static $showMetaSettingKey = 'forums_topics_show_meta';
|
||||
|
||||
/**
|
||||
* @brief Whether to track the sentiment scores in cloud_sentiment_scores for this content
|
||||
*/
|
||||
public $trackSentimentScore = true;
|
||||
|
||||
/**
|
||||
* Callback from \IPS\Http\Url\Inernal::correctUrlFromVerifyClass()
|
||||
@@ -565,26 +560,20 @@ class _Topic extends \IPS\Content\Item implements
|
||||
|
||||
if ( static::modPermission( 'lock', NULL, $container ) )
|
||||
{
|
||||
/* Poll always needs to go on the end */
|
||||
$poll = NULL;
|
||||
if ( isset( $formElements['poll'] ) )
|
||||
{
|
||||
$poll = $formElements['poll'];
|
||||
unset( $formElements['poll'] );
|
||||
}
|
||||
|
||||
/* Add lock/unlock options */
|
||||
if ( static::modPermission( 'unlock', NULL, $container ) )
|
||||
{
|
||||
$formElements['topic_open_time'] = new \IPS\Helpers\Form\Date( 'topic_open_time', ( $item and $item->topic_open_time ) ? \IPS\DateTime::ts( $item->topic_open_time ) : NULL, FALSE, array( 'time' => TRUE ) );
|
||||
}
|
||||
$formElements['topic_close_time'] = new \IPS\Helpers\Form\Date( 'topic_close_time', ( $item and $item->topic_close_time ) ? \IPS\DateTime::ts( $item->topic_close_time ) : NULL, FALSE, array( 'time' => TRUE ) );
|
||||
|
||||
/* Poll always needs to go on the end */
|
||||
if ( $poll )
|
||||
{
|
||||
$formElements['poll'] = $poll;
|
||||
}
|
||||
}
|
||||
|
||||
/* Poll always needs to go on the end */
|
||||
if ( isset( $formElements['poll'] ) )
|
||||
{
|
||||
$poll = $formElements['poll'];
|
||||
unset( $formElements['poll'] );
|
||||
$formElements['poll'] = $poll;
|
||||
}
|
||||
|
||||
return $formElements;
|
||||
@@ -1118,7 +1107,7 @@ class _Topic extends \IPS\Content\Item implements
|
||||
\IPS\Db::i()->delete( 'forums_answer_ratings', "topic IN(" . implode( ',', $itemTids ) . ")" );
|
||||
|
||||
/* And then update the topic with the new question rating count */
|
||||
\IPS\Db::i()->update( 'forums_topics', array( 'question_rating' =>
|
||||
\IPS\Db::i()->update( 'forums_topics', array( 'question_rating' =>
|
||||
\IPS\Db::i()->select( 'SUM(rating)', 'forums_question_ratings', array( 'topic=?', $this->tid ) )
|
||||
), array( 'tid=?', $this->tid ) );
|
||||
|
||||
|
||||
Reference in new issue
Block a user