Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -163,6 +163,11 @@ class Upgrade
|
||||
*/
|
||||
public function step5() : bool|array
|
||||
{
|
||||
/* Kill null tags */
|
||||
Db::i()->delete( 'core_tags', [ 'tag_text is null' ] );
|
||||
Db::i()->delete( 'core_tags_perms', [ 'tag_perm_aap_lookup not in (?)', Db::i()->select( 'tag_aap_lookup', 'core_tags' ) ] );
|
||||
Db::i()->delete( 'core_tags_cache', [ 'tag_cache_key not in (?)', Db::i()->select( 'tag_aai_lookup', 'core_tags' ) ] );
|
||||
|
||||
$tagsToKeep = [];
|
||||
if( isset( $_SESSION['upgrade_options']['core']['200000']['open_tags'] ) )
|
||||
{
|
||||
@@ -170,7 +175,7 @@ class Upgrade
|
||||
{
|
||||
/* Get the top 25 tags */
|
||||
$topTags = iterator_to_array(
|
||||
Db::i()->select( 'count(tag_id) as total, tag_text', 'core_tags', null, 'total desc', array( 0, 25 ), 'tag_text' )
|
||||
Db::i()->select( 'count(tag_id) as total, tag_text', 'core_tags', [ 'tag_text is not null' ], 'total desc', array( 0, 25 ), 'tag_text' )
|
||||
->setKeyField( 'tag_text' )
|
||||
->setValueField( 'total' )
|
||||
);
|
||||
@@ -180,7 +185,7 @@ class Upgrade
|
||||
elseif( $_SESSION['upgrade_options']['core']['200000']['open_tags'] == 'all' )
|
||||
{
|
||||
$tagsToKeep = iterator_to_array(
|
||||
Db::i()->select( 'distinct tag_text', 'core_tags' )
|
||||
Db::i()->select( 'distinct tag_text', 'core_tags', [ 'tag_text is not null' ] )
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -188,7 +193,7 @@ class Upgrade
|
||||
{
|
||||
/* If we did not have this setting, then we have closed tagging, so we should convert all tags */
|
||||
$tagsToKeep = iterator_to_array(
|
||||
Db::i()->select( 'distinct tag_text', 'core_tags' )
|
||||
Db::i()->select( 'distinct tag_text', 'core_tags', [ 'tag_text is not null' ] )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -240,37 +245,7 @@ class Upgrade
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fire background tasks to migrate lazy-load to native
|
||||
*
|
||||
* @return bool|array
|
||||
*/
|
||||
public function step6(): bool|array
|
||||
{
|
||||
foreach ( Content::routedClasses( FALSE, TRUE ) as $class )
|
||||
{
|
||||
if( isset( $class::$databaseColumnMap['content'] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
Task::queue( 'core', 'RebuildLazyLoad', array( 'class' => $class ), 3 );
|
||||
}
|
||||
catch( OutOfRangeException $ex ) { }
|
||||
}
|
||||
}
|
||||
|
||||
foreach( Application::allExtensions( 'core', 'EditorLocations', FALSE ) as $_key => $extension )
|
||||
{
|
||||
if( method_exists( $extension, 'rebuildLazyLoad' ) )
|
||||
{
|
||||
Task::queue( 'core', 'RebuildLazyLoadNonContent', array( 'extension' => $_key ), 3 );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
public function step7() : bool|array
|
||||
public function step6() : bool|array
|
||||
{
|
||||
/* send a notification if custom ad locations are present */
|
||||
|
||||
@@ -308,7 +283,7 @@ class Upgrade
|
||||
return true;
|
||||
}
|
||||
|
||||
public function step8() : bool|array
|
||||
public function step7() : bool|array
|
||||
{
|
||||
Task::queue( 'core', 'UpdateWidgetAreas', array(), 3 );
|
||||
return TRUE;
|
||||
|
||||
Reference in new issue
Block a user