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

@@ -11,7 +11,7 @@
namespace IPS\core\modules\admin\customization;
/* 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;
@@ -22,6 +22,11 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
*/
class _ajax extends \IPS\Dispatcher\Controller
{
/**
* @brief Has been CSRF-protected
*/
public static $csrfProtected = TRUE;
/**
* Return a CSS or HTML menu
*
@@ -189,7 +194,7 @@ class _ajax extends \IPS\Dispatcher\Controller
}
$where[] = array( \IPS\Db::i()->in( "MD5( CONCAT_WS( ',', template_app, template_location, template_group, template_name ) )", $uniqueIds ) );
}
if ( in_array( 'inherited', explode( ',', \IPS\Request::i()->filters ) ) )
if ( \in_array( 'inherited', explode( ',', \IPS\Request::i()->filters ) ) )
{
try
{
@@ -201,15 +206,15 @@ class _ajax extends \IPS\Dispatcher\Controller
catch( \OutOfRangeException $e ) { }
}
array_push( $parents, 0 );
if ( !in_array( 'unique', explode( ',', \IPS\Request::i()->filters ) ) )
if ( !\in_array( 'unique', explode( ',', \IPS\Request::i()->filters ) ) )
{
$where[] = array( 'template_user_added=0' );
}
if ( !in_array( 'unmodified', explode( ',', \IPS\Request::i()->filters ) ) )
if ( !\in_array( 'unmodified', explode( ',', \IPS\Request::i()->filters ) ) )
{
$where[] = array( 'template_user_edited>0 or template_added_to > 0' );
}
if ( !in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) )
if ( !\in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) )
{
$where[] = array( 'template_added_to=0' );
}
@@ -229,7 +234,7 @@ class _ajax extends \IPS\Dispatcher\Controller
{
$outOfDate = $result['template_user_edited'] < \IPS\Application::load( $result['template_app'] )->long_version;
if ( ( $outOfDate and !in_array( 'outofdate', explode( ',', \IPS\Request::i()->filters ) ) ) or ( !$outOfDate and !in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) ) )
if ( ( $outOfDate and !\in_array( 'outofdate', explode( ',', \IPS\Request::i()->filters ) ) ) or ( !$outOfDate and !\in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) ) )
{
unset( $return[ $result['template_app'] ][ $result['template_location'] ][ $result['template_group'] ][ $result['template_name'] ] );
continue;
@@ -276,7 +281,7 @@ class _ajax extends \IPS\Dispatcher\Controller
}
$where[] = array( \IPS\Db::i()->in( "MD5( CONCAT_WS( ',', css_app, css_location, css_path, css_name ) )", $uniqueIds ) );
}
if ( in_array( 'inherited', explode( ',', \IPS\Request::i()->filters ) ) )
if ( \in_array( 'inherited', explode( ',', \IPS\Request::i()->filters ) ) )
{
try
{
@@ -288,11 +293,11 @@ class _ajax extends \IPS\Dispatcher\Controller
catch( \OutOfRangeException $e ) { }
}
array_push( $parents, 0 );
if ( !in_array( 'unique', explode( ',', \IPS\Request::i()->filters ) ) )
if ( !\in_array( 'unique', explode( ',', \IPS\Request::i()->filters ) ) )
{
$where[] = array( 'css_added_to=?', \IPS\Request::i()->id );
}
if ( !in_array( 'unmodified', explode( ',', \IPS\Request::i()->filters ) ) )
if ( !\in_array( 'unmodified', explode( ',', \IPS\Request::i()->filters ) ) )
{
$where[] = array( 'css_user_edited>0' );
}
@@ -310,7 +315,7 @@ class _ajax extends \IPS\Dispatcher\Controller
{
$outOfDate = $result['css_user_edited'] < \IPS\Application::load( $result['css_app'] )->long_version;
if ( !$result['css_added_to'] and ( ( $outOfDate and !in_array( 'outofdate', explode( ',', \IPS\Request::i()->filters ) ) ) or ( !$outOfDate and !in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) ) ) )
if ( !$result['css_added_to'] and ( ( $outOfDate and !\in_array( 'outofdate', explode( ',', \IPS\Request::i()->filters ) ) ) or ( !$outOfDate and !\in_array( 'modified', explode( ',', \IPS\Request::i()->filters ) ) ) ) )
{
unset( $return[ $result['css_app'] ][ $result['css_location'] ][ $result['css_path'] ][ $result['css_name'] ] );
continue;