Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -5,14 +5,14 @@
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Converter
* @subpackage convert
* @since 08 Aug 2017
*/
namespace IPS\convert\extensions\core\Queue;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -26,12 +26,12 @@ class _InvisionCommunityRebuildContent
/**
* @brief Number of content items to rebuild per cycle
*/
public $rebuild = 50;
public $rebuild = \IPS\REBUILD_SLOW;
/**
* Parse data before queuing
*
* @param array $data
* @param array $data Data
* @return array
*/
public function preQueueData( $data )
@@ -108,7 +108,7 @@ class _InvisionCommunityRebuildContent
\IPS\Log::debug( "Running " . $classname . ", with an offset of " . $offset, 'ICrebuildPosts' );
$where = ( is_subclass_of( $classname, 'IPS\Content\Comment' ) ) ? ( is_array( $classname::commentWhere() ) ? array( $classname::commentWhere() ) : array() ) : array();
$where = ( is_subclass_of( $classname, 'IPS\Content\Comment' ) ) ? ( \is_array( $classname::commentWhere() ) ? array( $classname::commentWhere() ) : array() ) : array();
$select = $classname::db()->select( '*', $classname::$databaseTable, array_merge( $where, array( array( $classname::$databasePrefix . $classname::$databaseColumnId . ' < ?', $data['runPid'] ) ) ), $classname::$databasePrefix . $classname::$databaseColumnId . ' DESC', array( 0, $this->rebuild ) );
$iterator = new \IPS\Patterns\ActiveRecordIterator( $select, $classname );
$last = NULL;
@@ -212,7 +212,7 @@ class _InvisionCommunityRebuildContent
*
* @param mixed $data Data as it was passed to \IPS\Task::queue()
* @param int $offset Offset
* @return array( 'text' => 'Doing something...', 'complete' => 50 ) Text explaining task and percentage complete
* @return array Text explaining task and percentage complete
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
*/
public function getProgress( $data, $offset )
@@ -230,7 +230,7 @@ class _InvisionCommunityRebuildContent
/**
* Update mentions with new display name, ID and URL
*
* @param \DOMElement $element
* @param \DOMElement $element DOM element
* @return void
*/
public function updateMention( \DOMElement $element )
@@ -259,7 +259,7 @@ class _InvisionCommunityRebuildContent
/**
* Update local embeds for new names, IDs
*
* @param \DOMElement $element
* @param \DOMElement $element DOM element
* @return void
*/
public function updateEmbed( \DOMElement $element )
@@ -268,7 +268,7 @@ class _InvisionCommunityRebuildContent
{
$url = \IPS\Http\Url::createFromString( str_replace( '<___base_url___>', rtrim( \IPS\Settings::i()->base_url, '/' ), $element->getAttribute( 'src' ) ) );
if( !in_array( $url->hiddenQueryString['app'], array_keys( $this->embedLocations ) ) )
if( !\in_array( $url->hiddenQueryString['app'], array_keys( $this->embedLocations ) ) )
{
return;
}
@@ -307,7 +307,7 @@ class _InvisionCommunityRebuildContent
/**
* Update quotes for new names, IDs
*
* @param \DOMElement $element
* @param \DOMElement $element DOM element
* @return void
*/
public function updateQuote( \DOMElement $element )