Version 5.0.0 beta 7

This commit is contained in:
Neo committed 2025-12-19 17:18:38 -08:00
1 parent fa2a720105
commit 54d5dcd0a0
156 files changed
+4337 -2995

No files matched your search

@@ -24,6 +24,7 @@ use IPS\Node\Model;
use IPS\Text\Parser;
use LogicException;
use function defined;
use function is_array;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
@@ -141,7 +142,7 @@ class Alert extends EditorLocationsAbstract
/* Update */
try
{
if( $callback[1] == 'parseStatic' )
if( is_array( $callback ) and $callback[1] == 'parseStatic' )
{
$rebuilt = $callback( $alert['alert_content'], Member::load( $alert['alert_member_id'] ), FALSE, 'core_Alert' );
}
@@ -26,6 +26,7 @@ use LogicException;
use OutOfRangeException;
use function count;
use function defined;
use function is_array;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
@@ -193,7 +194,7 @@ class CustomField extends EditorLocationsAbstract
$rebuilt = FALSE;
try
{
if( $callback[1] == 'parseStatic' )
if( is_array( $callback ) and $callback[1] == 'parseStatic' )
{
$rebuilt = $callback( $member[ $fieldId ], Member::load( $member['member_id'] ), FALSE, 'core_ProfileField', $member['member_id'] );
}
@@ -25,6 +25,7 @@ use IPS\Text\Parser;
use LogicException;
use function count;
use function defined;
use function is_array;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
@@ -155,7 +156,7 @@ class Modcp extends EditorLocationsAbstract
{
try
{
if( $callback[1] == 'parseStatic' )
if( is_array( $callback ) and $callback[1] == 'parseStatic' )
{
$update[ $k ] = $callback( $log[ $k ], Member::load( $log['wl_moderator'] ), FALSE, 'core_Modcp', $log['wl_id'], NULL, ( $k == 'wl_note_member' ? 'member' : 'mod' ) );
}
@@ -25,6 +25,7 @@ use IPS\Text\Parser;
use LogicException;
use OutOfRangeException;
use function count;
use function is_array;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
@@ -150,7 +151,7 @@ class Reports extends EditorLocationsAbstract
try
{
if( $callback[1] == 'parseStatic' )
if( is_array( $callback ) and $callback[1] == 'parseStatic' )
{
$update['report'] = $callback( $report['report'], Member::load( $report['report_by'] ), FALSE, 'core_Reports', $report['id'], NULL, NULL );
}
@@ -183,7 +184,7 @@ class Reports extends EditorLocationsAbstract
try
{
if( $callback[1] == 'parseStatic' )
if( is_array( $callback ) and $callback[1] == 'parseStatic' )
{
$updateComment = $callback( $comment['comment'], Member::load( $comment['comment_by'] ), FALSE, 'core_Reports', $comment['id'], NULL, NULL );
}
@@ -25,6 +25,7 @@ use IPS\Text\LegacyParser;
use IPS\Text\Parser;
use LogicException;
use function defined;
use function is_array;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
@@ -142,7 +143,7 @@ class Signatures extends EditorLocationsAbstract
/* Update */
try
{
if( $callback[1] == 'parseStatic' )
if( is_array( $callback ) and $callback[1] == 'parseStatic' )
{
$rebuilt = LegacyParser::parseStatic( $member['signature'], Member::load( $member['member_id'] ), FALSE, 'core_Signatures', $member['member_id'] );
}
@@ -14,8 +14,11 @@ namespace IPS\core\extensions\core\FrontNavigation;
use IPS\Content;
use IPS\Content\Search\SearchContent;
use IPS\core\FrontNavigation\FrontNavigationAbstract;
use IPS\Helpers\Form\Radio;
use IPS\Helpers\Form\Select;
use IPS\Helpers\Form\Node as NodeForm;
use IPS\Helpers\Form\Translatable;
use IPS\Lang;
use IPS\Node\Model;
use IPS\Http\Url;
use IPS\Member;
@@ -117,6 +120,14 @@ class Node extends FrontNavigationAbstract
*/
public function title(): string
{
if( isset( $this->configuration['menu_title_node_type'] ) and $this->configuration['menu_title_node_type'] == 1 )
{
if( Member::loggedIn()->language()->checkKeyExists( 'menu_item_' . $this->id ) )
{
return Member::loggedIn()->language()->addToStack( 'menu_item_' . $this->id );
}
}
return (string) $this->node?->_title;
}
@@ -182,7 +193,7 @@ class Node extends FrontNavigationAbstract
$fields[] = new Select( 'menu_node_content_classes', $existingConfiguration['selected'] ?? null, null, array( 'options' => $classes, 'toggles' => $classToggles ), null, null, null, 'classes' );
/* Nodes */
foreach ( $classToggles as $class => $id )
foreach ( $classToggles as $class => $classId )
{
if ( isset( $class::$containerNodeClass ) )
{
@@ -212,6 +223,9 @@ class Node extends FrontNavigationAbstract
}
}
$fields[] = new Radio( 'menu_title_node_type', $existingConfiguration['menu_title_node_type'] ?? 0, NULL, array( 'options' => array( 0 => 'menu_title_node_inherit', 1 => 'menu_title_node_custom' ), 'toggles' => array( 1 => array( 'menu_title_node' ) ) ), NULL, NULL, NULL, 'menu_title_node_type' );
$fields[] = new Translatable( 'menu_title_node', NULL, NULL, array( 'app' => 'core', 'key' => $id ? "menu_item_{$id}" : NULL ), NULL, NULL, NULL, 'menu_title_node' );
return $fields;
}
@@ -225,7 +239,16 @@ class Node extends FrontNavigationAbstract
public static function parseConfiguration( array $configuration, int $id ): array
{
$class = $configuration['menu_node_content_classes'];
$return = [ 'nodeClass' => $class::$containerNodeClass, 'selected' => $class ];
$return = [
'nodeClass' => $class::$containerNodeClass,
'selected' => $class,
'menu_title_node_type' => $configuration['menu_title_node_type'] ?? 0
];
if( $configuration['menu_title_node_type'] == 1 and $configuration['menu_title_node'] )
{
Lang::saveCustom( 'core', 'menu_item_' . $id, $configuration['menu_title_node'] );
}
foreach( $configuration as $field => $value )
{
@@ -105,6 +105,7 @@ class PruneLargeTable extends QueueAbstract
public function postComplete( array $data, bool $processed = TRUE ) : void
{
/* If this was pruning follows, make sure to clear the follow count cache so it can rebuild */
$data = json_decode( $data['data'], true );
if( $data['setting'] == 'prune_follows' )
{
Db::i()->delete( 'core_follow_count_cache' );
@@ -152,7 +152,7 @@ class RebuildImageProxy extends QueueAbstract
Store::i()->currentImageProxyRebuild = array( $classname, $item->$idColumn );
/* Only run an update if the content has actually changed */
if( mb_strpos( $item->$contentColumn, 'imageproxy.php' ) AND $newContent = Parser::removeImageProxy( $item->$contentColumn, !$data['cachePeriod'] ) AND $newContent != $item->$contentColumn )
if( $item->$contentColumn and mb_strpos( $item->$contentColumn, 'imageproxy.php' ) AND $newContent = Parser::removeImageProxy( $item->$contentColumn, !$data['cachePeriod'] ) AND $newContent != $item->$contentColumn )
{
$item->$contentColumn = $newContent;
@@ -85,6 +85,7 @@ class RebuildImageProxyNonContent extends QueueAbstract
*/
public function run( array &$data, int $offset ): int
{
$did = 0;
foreach( Application::allExtensions( 'core', 'EditorLocations', FALSE, NULL, NULL, TRUE ) as $_key => $extension )
{
if( $_key != $data['extension'] )