Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+32 -6
View File
@@ -551,8 +551,13 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
}
catch( \Exception $ex )
{
if( $httpStatusCode !== 200 )
{
/* Unset page token */
unset( \IPS\Output::i()->jsVars['page_token'] );
}
\IPS\Output::i()->sidebar['enabled'] = FALSE;
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( $title, \IPS\Theme::i()->getTemplate( 'global', 'core' )->error( $title, $message, $code, NULL, \IPS\Member::loggedIn() ), array( 'app' => \IPS\Dispatcher::i()->application ? \IPS\Dispatcher::i()->application->directory : NULL, 'module' => \IPS\Dispatcher::i()->module ? \IPS\Dispatcher::i()->module->key : NULL, 'controller' => \IPS\Dispatcher::i()->controller ) ), $httpStatusCode, 'text/html', $httpHeaders, FALSE, FALSE );
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( $title, \IPS\Theme::i()->getTemplate( 'global', 'core' )->error( $title, $message, $code, NULL, \IPS\Member::loggedIn() ), \IPS\Dispatcher::i()->getLocationData() ), $httpStatusCode, 'text/html', $httpHeaders, FALSE, FALSE );
}
}
@@ -1554,7 +1559,7 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
$form->canSaveAndReload = true;
}
\IPS\Output::i()->title = $this->id ? \IPS\Member::loggedIn()->language()->addToStack('content_editing_page', NULL, array( 'sprintf' => array( $this->_title ) ) ) : \IPS\Member::loggedIn()->language()->addToStack('content_add_page');
\IPS\Output::i()->title = $this->id ? \IPS\Member::loggedIn()->language()->addToStack( 'content_editing_page', FALSE, array( 'sprintf' => array( $this->_title ) ) ) : \IPS\Member::loggedIn()->language()->addToStack('content_add_page');
}
/**
@@ -1887,12 +1892,33 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
}
else
{
/* Nope, not database tag spotted, assume it has been removed */
try
/* Nope, not database tag spotted, now check widgets to be sure... */
$keep = FALSE;
foreach( \IPS\Db::i()->select( '*', 'cms_page_widget_areas', array( 'area_page_id=?', $this->id ) ) as $k => $widgetMain )
{
$this->removeDatabaseMap();
$widgets = json_decode( $widgetMain['area_widgets'], TRUE );
if ( \is_array( $widgets ) )
{
foreach( $widgets as $row )
{
if ( $row['key'] == 'Database' and $row['configuration']['database'] == $database->id )
{
$keep = TRUE;
break;
}
}
}
}
if ( ! $keep )
{
try
{
$this->removeDatabaseMap();
}
catch( \LogicException $e ) { }
}
catch( \LogicException $e ) { }
}
}
}