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 -10
View File
@@ -12,7 +12,7 @@
namespace IPS\cms\Pages;
/* 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;
@@ -26,13 +26,12 @@ class _Folder extends \IPS\Node\Model
/**
* Munge different record types
*
*
* @return array
*/
public static function munge()
{
$rows = array();
$args = func_get_args();
$args = \func_get_args();
foreach( $args as $arg )
{
@@ -113,6 +112,9 @@ class _Folder extends \IPS\Node\Model
*/
public static $modalForms = TRUE;
/**
* @brief [Node] Restrictions
*/
protected static $restrictions = array(
'app' => 'cms',
'module' => 'pages',
@@ -142,8 +144,7 @@ class _Folder extends \IPS\Node\Model
/**
* [Node] Get buttons to display in tree
* Example code explains return value
* @endcode
*
* @param string $url Base URL
* @param bool $subnode Is this a subnode?
* @return array
@@ -226,7 +227,7 @@ class _Folder extends \IPS\Node\Model
$testPage = \IPS\cms\Pages\Page::load( $val, 'page_seo_name' );
/* Ok, we have a folder, but is it on the same tree as us ?*/
if ( intval( \IPS\Request::i()->folder_parent_id ) == $testPage->folder_id )
if ( \intval( \IPS\Request::i()->folder_parent_id ) == $testPage->folder_id )
{
/* Yep, this will break designers' mode and may confuse the FURL engine so we cannot allow this */
throw new \InvalidArgumentException('content_folder_name_furl_collision_folder');
@@ -256,7 +257,7 @@ class _Folder extends \IPS\Node\Model
}
} ) );
$class = get_called_class();
$class = \get_called_class();
$form->add( new \IPS\Helpers\Form\Node( 'folder_parent_id', $this->parent_id ? $this->parent_id : 0, FALSE, array(
'class' => '\IPS\cms\Pages\Folder',
@@ -362,7 +363,7 @@ class _Folder extends \IPS\Node\Model
}
/**
* Retrieve item count (if applicable) for a node.
* Retrieve item \count(if applicable) for a node.
*
* @return int|bool
*/
@@ -388,7 +389,7 @@ class _Folder extends \IPS\Node\Model
if ( $hasContent )
{
$form->add( new \IPS\Helpers\Form\Node( 'cms_move_pages', 0, TRUE, array( 'class' => get_class( $this ), 'disabled' => array( $this->_id ), 'disabledLang' => 'node_move_delete', 'zeroVal' => 'cms_move_to_root', 'subnodes' => FALSE, 'permissionCheck' => function( $node )
$form->add( new \IPS\Helpers\Form\Node( 'cms_move_pages', 0, TRUE, array( 'class' => \get_class( $this ), 'disabled' => array( $this->_id ), 'disabledLang' => 'node_move_delete', 'zeroVal' => 'cms_move_to_root', 'subnodes' => FALSE, 'permissionCheck' => function( $node )
{
return \IPS\Request::i()->id != $node->id;
} ) ) );
@@ -443,7 +444,7 @@ class _Folder extends \IPS\Node\Model
$path[] = $obj->name;
}
$this->path = ( count( $path ) ) ? implode( '/', $path ) . '/' . $this->name : $this->name;
$this->path = ( \count( $path ) ) ? implode( '/', $path ) . '/' . $this->name : $this->name;
/* Save path update */
parent::save();