Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

@@ -1,12 +1,11 @@
<?php
/**
* @brief Advanced Settings
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 10 June 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPS\core\modules\admin\settings;
@@ -338,8 +337,26 @@ class _advanced extends \IPS\Dispatcher\Controller
}
else
{
\IPS\Member::loggedIn()->language()->words['task_method_cron_warning'] = sprintf( \IPS\Member::loggedIn()->language()->get( 'task_method_cron_warning', FALSE ), PHP_BINDIR . '/php -d memory_limit=-1 -d max_execution_time=0 ' . \IPS\ROOT_PATH . '/applications/core/interface/task/task.php ' . \IPS\Settings::i()->task_cron_key );
\IPS\Member::loggedIn()->language()->words['task_method_web_warning'] = sprintf( \IPS\Member::loggedIn()->language()->get( 'task_method_web_warning', FALSE ), \IPS\Http\Url::internal( 'applications/core/interface/task/web.php?key=' . \IPS\Settings::i()->task_cron_key, 'none' ) );
$cronCommand = PHP_BINDIR . '/php -d memory_limit=-1 -d max_execution_time=0 ' . \IPS\ROOT_PATH . '/applications/core/interface/task/task.php ' . \IPS\Settings::i()->task_cron_key;
try
{
\IPS\Member::loggedIn()->language()->words['task_method_cron_warning'] = sprintf( \IPS\Member::loggedIn()->language()->get( 'task_method_cron_warning', FALSE ), $cronCommand );
}
catch ( \UnderflowException $e )
{
\IPS\Member::loggedIn()->language()->words['task_method_cron_warning'] = $cronCommand;
}
$webCronUrl = (string) \IPS\Http\Url::internal( 'applications/core/interface/task/web.php?key=' . \IPS\Settings::i()->task_cron_key, 'none' );
try
{
\IPS\Member::loggedIn()->language()->words['task_method_web_warning'] = sprintf( \IPS\Member::loggedIn()->language()->get( 'task_method_web_warning', FALSE ), $webCronUrl );
}
catch ( \UnderflowException $e )
{
\IPS\Member::loggedIn()->language()->words['task_method_web_warning'] = $webCronUrl;
}
$options = array(
'options' => array(
'normal' => 'task_method_normal',
@@ -366,17 +383,20 @@ class _advanced extends \IPS\Dispatcher\Controller
$form->add( new \IPS\Helpers\Form\Number( 'widget_cache_ttl', ( isset( \IPS\Settings::i()->widget_cache_ttl ) ) ? \IPS\Settings::i()->widget_cache_ttl : 60, FALSE, array( 'min' => 60 ), NULL, \IPS\Member::loggedIn()->language()->addToStack('for'), \IPS\Member::loggedIn()->language()->addToStack('seconds') ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'auto_polling_enabled', \IPS\Settings::i()->auto_polling_enabled, FALSE ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'theme_disk_cache_templates', \IPS\Settings::i()->theme_disk_cache_templates, FALSE, array( 'togglesOn' => array( 'theme_disk_cache_path' ) ) ) );
$form->add( new \IPS\Helpers\Form\Text( 'theme_disk_cache_path', \IPS\Settings::i()->theme_disk_cache_path ? \IPS\Settings::i()->theme_disk_cache_path : \IPS\ROOT_PATH . '/uploads', FALSE, array(), function( $val )
if ( ! \IPS\CIC )
{
if ( \IPS\Request::i()->theme_disk_cache_templates_checkbox )
$form->add( new \IPS\Helpers\Form\YesNo( 'theme_disk_cache_templates', \IPS\Settings::i()->theme_disk_cache_templates, FALSE, array( 'togglesOn' => array( 'theme_disk_cache_path' ) ) ) );
$form->add( new \IPS\Helpers\Form\Text( 'theme_disk_cache_path', \IPS\Settings::i()->theme_disk_cache_path ? \IPS\Settings::i()->theme_disk_cache_path : \IPS\ROOT_PATH . '/uploads', FALSE, array(), function( $val )
{
if ( ! is_dir( \IPS\Request::i()->theme_disk_cache_path ) or ! is_readable( \IPS\Request::i()->theme_disk_cache_path ) or ! is_writable( \IPS\Request::i()->theme_disk_cache_path ) )
if ( \IPS\Request::i()->theme_disk_cache_templates_checkbox )
{
throw new \InvalidArgumentException( 'theme_disk_cache_path_wrong' );
if ( ! is_dir( \IPS\Request::i()->theme_disk_cache_path ) or ! is_readable( \IPS\Request::i()->theme_disk_cache_path ) or ! is_writable( \IPS\Request::i()->theme_disk_cache_path ) )
{
throw new \InvalidArgumentException( 'theme_disk_cache_path_wrong' );
}
}
}
}, NULL, NULL, 'theme_disk_cache_path' ) );
}, NULL, NULL, 'theme_disk_cache_path' ) );
}
if ( $values = $form->values() )
{