Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

@@ -12,36 +12,33 @@
namespace IPS\cms\extensions\core\ContentRouter;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Application\Module;
use IPS\Extensions\ContentRouterAbstract;
use IPS\Member;
use IPS\Member\Group;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief Content Router extension: Pages
*/
class _Pages
class Pages extends ContentRouterAbstract
{
/**
* @brief Content Item Classes
*/
public $classes = array();
/**
* @brief Can be shown in similar content
*/
public $similarContent = FALSE;
/**
* Constructor
*
* @param \IPS\Member|IPS\Member\Group|NULL $memberOrGroup If checking access, the member/group to check for, or NULL to not check access
* @param Member|Group|NULL $memberOrGroup If checking access, the member/group to check for, or NULL to not check access
* @return void
*/
public function __construct( $memberOrGroup = NULL )
public function __construct( Group|Member $memberOrGroup = NULL )
{
if ( $memberOrGroup === NULL or $memberOrGroup->canAccessModule( \IPS\Application\Module::get( 'cms', 'pages', 'front' ) ) )
if ( $memberOrGroup === NULL or $memberOrGroup->canAccessModule( Module::get( 'cms', 'pages', 'front' ) ) )
{
$this->classes[] = 'IPS\cms\Pages\PageItem';
}
@@ -12,38 +12,40 @@
namespace IPS\cms\extensions\core\ContentRouter;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use Exception;
use IPS\cms\Databases;
use IPS\Extensions\ContentRouterAbstract;
use IPS\Member;
use IPS\Member\Group;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief Content Router extension: Records
*/
class _Records
class Records extends ContentRouterAbstract
{
/**
* @brief Content Item Classes
*/
public $classes = array();
/**
* @brief Can be shown in similar content
*/
public $similarContent = TRUE;
public bool $similarContent = TRUE;
/**
* Constructor
*
* @param \IPS\Member|IPS\Member\Group|NULL $member If checking access, the member/group to check for, or NULL to not check access
* @return void
* @param Member|Group|null $member If checking access, the member/group to check for, or NULL to not check access
*/
public function __construct( $member = NULL )
public function __construct( Member|Group $member = NULL )
{
try
{
foreach ( \IPS\cms\Databases::databases() as $id => $database )
foreach ( Databases::databases() as $id => $database )
{
if( $database->page_id )
{
@@ -54,6 +56,6 @@ class _Records
}
}
}
catch ( \Exception $e ) {} // If you have not upgraded pages but it is installed, this throws an error
catch ( Exception $e ) {} // If you have not upgraded pages but it is installed, this throws an error
}
}