Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -75,6 +75,12 @@ class _cleanup extends \IPS\Task
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_admin_logs', array( 'ctime < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P' . \IPS\Settings::i()->prune_log_admin . 'D' ) )->getTimestamp() ) );
|
||||
}
|
||||
|
||||
/* ...and moderators logs */
|
||||
if( \IPS\Settings::i()->prune_log_moderator )
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_moderator_logs', array( 'ctime < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P' . \IPS\Settings::i()->prune_log_moderator . 'D' ) )->getTimestamp() ) );
|
||||
}
|
||||
|
||||
/* ...and error logs */
|
||||
if( \IPS\Settings::i()->prune_log_error )
|
||||
@@ -160,9 +166,8 @@ class _cleanup extends \IPS\Task
|
||||
catch ( \UnexpectedValueException $e ) { }
|
||||
}
|
||||
|
||||
/* Remove widget trash (configs stored older than a day) */
|
||||
\IPS\Db::i()->delete( 'core_widget_trash', array( 'date < ?', time() - 86400 ) );
|
||||
|
||||
/* Remove widgets */
|
||||
\IPS\Widget::emptyTrash();
|
||||
|
||||
/* Reset expired "moderate content till.." timestamps */
|
||||
\IPS\Db::i()->update( 'core_members', array( 'mod_posts' => 0 ), array( 'mod_posts != -1 and mod_posts <?', time() ) );
|
||||
|
||||
@@ -44,8 +44,8 @@ class _clearsessions extends \IPS\Task
|
||||
$timeout = $phpTimeout ?: $timeout;
|
||||
}
|
||||
|
||||
\IPS\Session\Front::i()->gc( $timeout );
|
||||
\IPS\Session\Admin::i()->gc( $timeout );
|
||||
\IPS\Db::i()->delete( 'core_sys_cp_sessions', array( 'session_running_time<?', ( time() - $timeout ) ) );
|
||||
\IPS\Session\Front::clearSessions( $timeout );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -52,13 +52,13 @@ class _pop extends \IPS\Task
|
||||
/* Connect */
|
||||
if ( !$pop3->connect( ( \IPS\Settings::i()->pop3_tls ? 'ssl://' : '' ) . \IPS\Settings::i()->pop3_server, \IPS\Settings::i()->pop3_port ) )
|
||||
{
|
||||
throw new \IPS\Task\Exception( $this, \IPS\Member::loggedIn()->language()->addToStack( 'pop3_cant_connect' ) );
|
||||
throw new \IPS\Task\Exception( $this, 'pop3_cant_connect' );
|
||||
}
|
||||
|
||||
/* Login */
|
||||
if ( !$pop3->login( \IPS\Settings::i()->pop3_user, \IPS\Settings::i()->pop3_password ) )
|
||||
{
|
||||
throw new \IPS\Task\Exception( $this, \IPS\Member::loggedIn()->language()->addToStack( 'pop3_cant_login ' ) );
|
||||
throw new \IPS\Task\Exception( $this, 'pop3_cant_login' );
|
||||
}
|
||||
|
||||
/* Got any? */
|
||||
|
||||
@@ -51,6 +51,11 @@ class _updatecheck extends \IPS\Task
|
||||
{
|
||||
$response = $url->setQueryString( 'version', $version )->request()->get()->decodeJson();
|
||||
$coreApp = \IPS\Application::load('core');
|
||||
$currentDetails = json_decode( $coreApp->update_version, TRUE );
|
||||
if ( $currentDetails['version'] != $response['version'] and \IPS\Settings::i()->upgrade_email )
|
||||
{
|
||||
\IPS\Email::buildFromTemplate( 'core', 'upgrade', array( $response['version'], $response['releasenotes'], $response['security'] ) )->send( explode( ',', \IPS\Settings::i()->upgrade_email ) );
|
||||
}
|
||||
$coreApp->update_version = json_encode( $response );
|
||||
$coreApp->update_last_check = time();
|
||||
$coreApp->save();
|
||||
|
||||
Reference in new issue
Block a user