Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -55,6 +55,13 @@ class _Controller extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Set the title */
|
||||
$title = $nodeClass::$nodeTitle;
|
||||
|
||||
if( \IPS\Request::i()->subnode == 1 AND isset( $nodeClass::$subnodeClass ) )
|
||||
{
|
||||
$subnodeClass = $nodeClass::$subnodeClass;
|
||||
$title = $subnodeClass::$nodeTitle;
|
||||
}
|
||||
|
||||
$this->title = $title;
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( $title );
|
||||
|
||||
@@ -466,7 +473,7 @@ class _Controller extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->output .= $form;
|
||||
\IPS\Output::i()->output .= $this->_showForm( $form );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -491,6 +498,17 @@ class _Controller extends \IPS\Dispatcher\Controller
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get form
|
||||
*
|
||||
* @param \IPS\Helpers\Form $form The form as returned by _addEditForm()
|
||||
* @return string
|
||||
*/
|
||||
protected function _showForm( \IPS\Helpers\Form $form )
|
||||
{
|
||||
return (string) $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect after save
|
||||
*
|
||||
@@ -499,7 +517,7 @@ class _Controller extends \IPS\Dispatcher\Controller
|
||||
* @param string $lastUsedTab The tab last used in the form
|
||||
* @return void
|
||||
*/
|
||||
protected function _afterSave( \IPS\Node\Model $old = NULL, \IPS\Node\Model $new, $lastUsedTab = FALSE )
|
||||
protected function _afterSave( ?\IPS\Node\Model $old, \IPS\Node\Model $new, $lastUsedTab = FALSE )
|
||||
{
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
@@ -1163,13 +1181,23 @@ class _Controller extends \IPS\Dispatcher\Controller
|
||||
if ( $values = $matrix->values() )
|
||||
{
|
||||
$_perms = array();
|
||||
|
||||
|
||||
/* Check for "all" checkboxes */
|
||||
foreach ( $nodeClass::$permissionMap as $k => $v )
|
||||
{
|
||||
if ( isset( \IPS\Request::i()->__all[ $k ] ) )
|
||||
{
|
||||
$_perms[ $v ] = '*';
|
||||
$shouldCheckAll = TRUE;
|
||||
foreach( $matrix->elements as $group => $element )
|
||||
{
|
||||
if ( isset( $element[ $k ] ) and $element[ $k ]->options['disabled'] )
|
||||
{
|
||||
$shouldCheckAll = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$_perms[ $v ] = $shouldCheckAll ? '*' : array();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1195,7 +1223,7 @@ class _Controller extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Finalise */
|
||||
foreach ( $_perms as $k => $v )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user