Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -190,6 +190,7 @@ class _Upgrade
|
||||
\IPS\Task::queue( 'core', 'PruneLargeTable', array(
|
||||
'table' => 'core_member_history',
|
||||
'where' => array( 'log_date < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P365D' ) )->getTimestamp() ),
|
||||
'setting' => 'prune_member_history',
|
||||
), 4 );
|
||||
}
|
||||
}
|
||||
@@ -208,16 +209,19 @@ class _Upgrade
|
||||
\IPS\Task::queue( 'core', 'PruneLargeTable', array(
|
||||
'table' => 'core_members_known_ip_addresses',
|
||||
'where' => array( 'last_seen < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P365D' ) )->getTimestamp() ),
|
||||
'setting' => 'prune_known_ips',
|
||||
), 4 );
|
||||
|
||||
\IPS\Task::queue( 'core', 'PruneLargeTable', array(
|
||||
'table' => 'core_members_known_devices',
|
||||
'where' => array( 'last_seen < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P365D' ) )->getTimestamp() ),
|
||||
'setting' => 'prune_known_devices',
|
||||
), 4 );
|
||||
|
||||
\IPS\Task::queue( 'core', 'PruneLargeTable', array(
|
||||
'table' => 'core_item_markers',
|
||||
'where' => array( 'item_member_id IN(?)', \IPS\Db::i()->select( 'member_id', 'core_members', array( 'last_activity < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P60D' ) )->getTimestamp() ) ) ),
|
||||
'setting' => 'prune_item_markers',
|
||||
'deleteJoin' => array(
|
||||
'column' => 'member_id',
|
||||
'table' => 'core_members',
|
||||
@@ -228,7 +232,8 @@ class _Upgrade
|
||||
|
||||
\IPS\Task::queue( 'core', 'PruneLargeTable', array(
|
||||
'table' => 'core_follow',
|
||||
'where' => array( 'follow_member_id IN(?)', \IPS\Db::i()->select( 'member_id', 'core_members', array( 'last_activity < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P365D' ) )->getTimestamp() ) ) ),
|
||||
'where' => array( 'follow_app!=? AND follow_area!=? AND follow_member_id IN(?)', 'core', 'member', \IPS\Db::i()->select( 'member_id', 'core_members', array( 'last_activity < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P365D' ) )->getTimestamp() ) ) ),
|
||||
'setting' => 'prune_follows',
|
||||
'deleteJoin' => array(
|
||||
'column' => 'member_id',
|
||||
'table' => 'core_members',
|
||||
@@ -312,7 +317,7 @@ class _Upgrade
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'core_ratings',
|
||||
'query' => "DELETE FROM " . \IPS\Db::i()->prefix . "core_ratings WHERE " . \IPS\Db::i()->in( 'class', $validClasses, TRUE )
|
||||
'query' => "DELETE FROM `" . \IPS\Db::i()->prefix . "core_ratings` WHERE " . \IPS\Db::i()->in( 'class', $validClasses, TRUE )
|
||||
) ) );
|
||||
|
||||
if ( \count( $toRun ) )
|
||||
@@ -447,28 +452,31 @@ class _Upgrade
|
||||
/* Initiate image proxy rebuilds to remove image proxy */
|
||||
unset( \IPS\Data\Store::i()->currentImageProxyRebuild );
|
||||
|
||||
foreach ( \IPS\Content::routedClasses( FALSE, TRUE ) as $class )
|
||||
if( \IPS\Db::i()->checkForTable('core_image_proxy') )
|
||||
{
|
||||
if( isset( $class::$databaseColumnMap['content'] ) )
|
||||
foreach ( \IPS\Content::routedClasses( FALSE, TRUE ) as $class )
|
||||
{
|
||||
try
|
||||
if( isset( $class::$databaseColumnMap['content'] ) )
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildImageProxy', array( 'class' => $class ), 4 );
|
||||
try
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildImageProxy', array( 'class' => $class ), 4 );
|
||||
}
|
||||
catch( \OutOfRangeException $ex ) { }
|
||||
}
|
||||
catch( \OutOfRangeException $ex ) { }
|
||||
}
|
||||
}
|
||||
|
||||
foreach( \IPS\Application::allExtensions( 'core', 'EditorLocations', FALSE, NULL, NULL, TRUE, TRUE ) as $_key => $extension )
|
||||
{
|
||||
if( method_exists( $extension, 'rebuildImageProxy' ) )
|
||||
foreach( \IPS\Application::allExtensions( 'core', 'EditorLocations', FALSE, NULL, NULL, TRUE, TRUE ) as $_key => $extension )
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildImageProxyNonContent', array( 'extension' => $_key ), 4 );
|
||||
if( method_exists( $extension, 'rebuildImageProxy' ) )
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildImageProxyNonContent', array( 'extension' => $_key ), 4 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Also initiate the task to delete the files. If we are caching indefinitely, files will be retained but the table still should be dropped. */
|
||||
\IPS\Task::queue( 'core', 'DeleteImageProxyFiles', array(), 5 );
|
||||
/* Also initiate the task to delete the files. If we are caching indefinitely, files will be retained but the table still should be dropped. */
|
||||
\IPS\Task::queue( 'core', 'DeleteImageProxyFiles', array(), 5 );
|
||||
}
|
||||
|
||||
/* Disable third party addons to prevent errors post-upgrade */
|
||||
foreach( \IPS\Application::enabledApplications() as $app )
|
||||
|
||||
Reference in new issue
Block a user