Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -50,11 +50,13 @@ class _errorLogs extends \IPS\Dispatcher\Controller
$table->parsers = array(
'log_member' => function( $val )
{
try
$member = \IPS\Member::load( $val );
if( $member->member_id )
{
return htmlentities( \IPS\Member::load( $val )->name, \IPS\HTMLENTITIES, 'UTF-8', FALSE );
return htmlentities( $member->name, ENT_DISALLOWED, 'UTF-8', FALSE );
}
catch ( \OutOfBoundsException $e )
else
{
return '';
}
@@ -62,7 +62,7 @@ class _hookedFiles extends \IPS\Dispatcher\Controller
{
try
{
return \IPS\Plugin::load($row['plugin'])->name;
return htmlspecialchars( \IPS\Plugin::load($row['plugin'])->name, ENT_DISALLOWED, 'UTF-8', FALSE );
}
catch ( \OutOfRangeException $e )
{
@@ -109,27 +109,7 @@ class _recovery extends \IPS\Dispatcher\Controller
return array( 3, \IPS\Member::loggedIn()->language()->addToStack( 'reset_theme_to_default' ), 75 );
break;
case 3: # Login Handlers
$handlersDisabled = array();
/* Disable all login handlers other than Internal */
foreach( \IPS\Login::handlers( TRUE ) AS $key => $handler )
{
if ( $key != 'Internal' )
{
$handler->_enabled = FALSE;
$handler->save();
$handlersDisabled[] = $key;
}
}
$_SESSION['recoveryLogins'] = $handlersDisabled;
return array( 4, \IPS\Member::loggedIn()->language()->addToStack( 'disabled_login_handlers' ), 100 );
break;
case 4: # Done
return NULL;
break;
@@ -165,14 +145,7 @@ class _recovery extends \IPS\Dispatcher\Controller
/* Did we reset the theme? */
$theme = $_SESSION['recoveryTheme'];
/* Did we disable any login handlers? */
$logins = array();
foreach( $_SESSION['recoveryLogins'] AS $handler )
{
$logins[] = \IPS\Login\LoginAbstract::constructFromData( \IPS\Db::i()->select( '*', 'core_login_handlers', array( "login_key=?", $handler ) )->first() );
}
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( 'recovery_mode' );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'support' )->recovery( $apps, $plugins, $theme, $logins );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'support' )->recovery( $apps, $plugins, $theme );
}
}
@@ -175,6 +175,9 @@ class _support extends \IPS\Dispatcher\Controller
/* Reset theme maps to make sure bad data hasn't been cached by visits mid-setup */
foreach( \IPS\Theme::themes() as $id => $set )
{
/* Invalidate template disk cache */
$set->cache_key = md5( microtime() . mt_rand( 0, 1000 ) );
/* Update mappings */
$set->css_map = array();
$set->save();
@@ -536,9 +539,7 @@ class _support extends \IPS\Dispatcher\Controller
'toolbars' => \IPS\Settings::i()->ckeditor_toolbars,
);
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), array( 'conf_key=?', 'ckeditor_extraPlugins' ) );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), array( 'conf_key=?', 'ckeditor_toolbars' ) );
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->changeValues( array( 'ckeditor_extraPlugins' => '', 'ckeditor_toolbars' => '' ) );
$restoredEditor = TRUE;
}
@@ -632,9 +633,7 @@ class _support extends \IPS\Dispatcher\Controller
{
$editorConfigutation = \IPS\Data\Store::i()->editorConfiguationToRestore;
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $editorConfigutation['extraPlugins'] ), array( 'conf_key=?', 'ckeditor_extraPlugins' ) );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $editorConfigutation['toolbars'] ), array( 'conf_key=?', 'ckeditor_toolbars' ) );
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->changeValues( array( 'ckeditor_extraPlugins' => $editorConfigutation['extraPlugins'], 'ckeditor_toolbars' => $editorConfigutation['toolbars'] ) );
unset( \IPS\Data\Store::i()->editorConfiguationToRestore );
}
@@ -84,7 +84,8 @@ class _systemLogs extends \IPS\Dispatcher\Controller
$table->langPrefix = 'log_';
$table->include = array( 'time', 'category', 'message' );
$table->parsers = array(
'message' => function( $val, $row ) {
'message' => function( $val, $row )
{
if ( mb_strlen( $val ) > 100 )
{
$val = mb_substr( $val, 0, 100 ) . '...';
@@ -94,15 +95,17 @@ class _systemLogs extends \IPS\Dispatcher\Controller
$val = "{$row['exception_class']} ({$row['exception_code']})\n{$val}";
}
$val = htmlspecialchars( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE );
$val = htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE );
return $val;
},
'time' => function( $val ) {
'time' => function( $val )
{
return \IPS\DateTime::ts( $val );
},
'member_id' => function ( $val ){
return \IPS\Member::load( $val )->name;
'member_id' => function ( $val )
{
return htmlspecialchars( \IPS\Member::load( $val )->name, ENT_DISALLOWED, 'UTF-8', FALSE );
}
);
$table->sortBy = $table->sortBy ?: 'time';
@@ -234,7 +237,8 @@ class _systemLogs extends \IPS\Dispatcher\Controller
$table = new \IPS\Helpers\Table\Custom( $source, \IPS\Http\Url::internal( 'app=core&module=support&controller=systemLogs&do=fileLogs' ) );
$table->langPrefix = 'log_';
$table->parsers = array(
'time' => function( $val ) {
'time' => function( $val )
{
return \IPS\DateTime::ts( $val );
}
);
@@ -43,7 +43,7 @@ class _utf8mb4 extends \IPS\Dispatcher\Controller
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('utf8mb4_converter');
/* Check it isn't utf8mb4 already */
if ( \IPS\Settings::i()->getFromConfGlobal('sql_utf8mb4') )
if ( \IPS\Settings::i()->getFromConfGlobal('sql_utf8mb4') === TRUE)
{
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('global', 'core')->message( 'utf8mb4_converter_finished', 'success' );
return;
@@ -74,7 +74,7 @@ class _utf8mb4 extends \IPS\Dispatcher\Controller
{
$form = new \IPS\Helpers\Form( 'utf8mb4_converter_intro', 'continue' );
$form->hiddenValues['continue'] = 1;
$form->addMessage( 'utf8mb4_converter_explain' );
$form->addMessage( \IPS\CIC ? 'utf8mb4_converter_cic_explain' : 'utf8mb4_converter_explain' );
if ( $form->values() )
{
@@ -233,7 +233,7 @@ class _utf8mb4 extends \IPS\Dispatcher\Controller
}
/* If this is the search index table, initiate rebuild now. */
if( $table == 'core_search_index' )
if( $table == 'core_search_index' and \IPS\Settings::i()->search_method == 'mysql' )
{
\IPS\Content\Search\Index::i()->rebuild();
}