Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+17 -8
View File
@@ -11,7 +11,7 @@
namespace IPS;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -49,11 +49,16 @@ class _Settings extends \IPS\Patterns\Singleton
*/
protected function __construct()
{
if ( file_exists( \IPS\ROOT_PATH . '/conf_global.php' ) )
if ( file_exists( \IPS\SITE_FILES_PATH . '/conf_global.php' ) )
{
$allowedFields = $this->getAllowedFields();
require( \IPS\ROOT_PATH . '/conf_global.php' );
require( \IPS\SITE_FILES_PATH . '/conf_global.php' );
if ( \IPS\CIC2 )
{
$INFO['sql_pass'] = $_SERVER['IPS_CLOUD2_DBPASS'];
$INFO['sql_read_pass'] = $_SERVER['IPS_CLOUD2_DBPASS'];
}
if ( isset( $INFO ) )
{
if( isset( $INFO['board_url'] ) AND ( !isset( $INFO['base_url'] ) OR !$INFO['base_url'] ) )
@@ -71,7 +76,7 @@ class _Settings extends \IPS\Patterns\Singleton
foreach( $INFO as $k => $v )
{
if ( ! in_array( $k, $allowedFields ) )
if ( ! \in_array( $k, $allowedFields ) )
{
unset( $INFO[ $k ] );
}
@@ -105,15 +110,19 @@ class _Settings extends \IPS\Patterns\Singleton
/* CiC hardcoded */
if ( \IPS\CIC )
{
if ( in_array( $key, array( 'xforward_matching', 'use_friendly_urls', 'htaccess_mod_rewrite', 'seo_r_on' ) ) )
if ( \in_array( $key, array( 'xforward_matching', 'use_friendly_urls', 'htaccess_mod_rewrite', 'seo_r_on' ) ) )
{
return TRUE;
}
if ( $key == 'task_use_cron' )
{
return 'cron';
return 'normal';
}
}
elseif ( \IPS\CIC2 and $key == 'archive_on' )
{
return TRUE;
}
/* Get normally */
$return = parent::__get( $key );
@@ -229,7 +238,7 @@ class _Settings extends \IPS\Patterns\Singleton
$valueToCache = isset( $defaultValues[ $k ] ) ? $defaultValues[ $k ] : $v;
/* Make sure the key is valid */
if( !in_array( $k, $validKeys ) )
if( !\in_array( $k, $validKeys ) )
{
if ( \IPS\IN_DEV )
{
@@ -256,7 +265,7 @@ class _Settings extends \IPS\Patterns\Singleton
if ( ! isset( static::$confGlobal[ $dk ] ) )
{
/* Make sure objects are cast to string as the DB bind layer will do this automatically when saving */
if ( is_object( $dv ) and method_exists( $dv, '__toString' ) )
if ( \is_object( $dv ) and method_exists( $dv, '__toString' ) )
{
$dv = (string) $dv;
}