Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -7,7 +7,7 @@
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Downloads
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11401 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -159,43 +159,53 @@ class comments_core_reports extends classes_comments_renderer
*/
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
{
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $this->memberData['member_id'] ), "id=" . $parentId );
$report = $this->fetchParent( $parentId );
//-----------------------------------------
// Notify other moderators
//-----------------------------------------
//-----------------------------------------
$report = $this->fetchParent( $parentId );
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
$notify = new $classToLoad( $this->registry );
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
{
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
}
else
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
}
if ( $type == 'add' )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
$notify->sendReplyNotifications( $array['comment_text'] );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
$notify = new $classToLoad( $this->registry );
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
{
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
}
else
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
}
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
$notify->sendReplyNotifications( $array['comment_text'] );
}
}
//-----------------------------------------
// Mark read
//-----------------------------------------
$this->registry->classItemMarking->markRead( array( 'forumID' => 0, 'itemID' => $report['id'] ), 'core' );
return $array;
}