Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

@@ -93,6 +93,8 @@ class acprestrictions extends Controller
{
Session::i()->csrfCheck();
$this->restrictions = $this->_getJson( ROOT_PATH . "/applications/{$this->application->directory}/data/acprestrictions.json" );
/* Figure out the items we are reordering, we would only be reordering a single group */
$newOrder = array();
$position = 1;
@@ -13,6 +13,7 @@ namespace IPS\core\modules\admin\developer;
use IPS\Developer\Controller;
use IPS\Helpers\Form;
use IPS\Helpers\Form\Codemirror;
use IPS\Helpers\Form\Select;
use IPS\Helpers\Form\Text;
use IPS\Helpers\Table\Custom;
@@ -152,6 +153,7 @@ class acpsearch extends Controller
'options' => $restrictions
) ) );
$form->add( new Form\Stack( 'dev_acpsearch_keywords', $row['keywords'] ?? null, true ) );
$form->add( new Codemirror( 'dev_acpsearch_callback', $row['callback'] ?? null, false, [ 'codeModeAllowedLanguages' => [ 'php' ] ] ) );
if( $values = $form->values() )
{
@@ -161,6 +163,11 @@ class acpsearch extends Controller
'keywords' => $values['dev_acpsearch_keywords']
];
if( !empty( $values['dev_acpsearch_callback'] ) )
{
$keywordData['callback'] = $values['dev_acpsearch_callback'];
}
if( $controller == $values['dev_acpsearch_controller'] )
{
$json[ $controller ] = $keywordData;
@@ -13,6 +13,7 @@ namespace IPS\core\modules\admin\developer;
use DirectoryIterator;
use IPS\Application;
use IPS\Data\Store;
use IPS\Developer;
use IPS\Developer\Controller;
use IPS\Helpers\Form;
@@ -25,10 +26,10 @@ use IPS\Output\UI\UiExtension;
use IPS\Request;
use IPS\Session;
use IPS\Theme;
use OutOfRangeException;
use function defined;
use function sprintf;
use const IPS\IPS_FOLDER_PERMISSION;
use const IPS\REBUILD_QUICK;
use const IPS\ROOT_PATH;
/* To prevent PHP errors (extending class does not exist) revealing path */
@@ -305,6 +306,14 @@ class extensions extends Controller
file_put_contents( ROOT_PATH . "/applications/{$this->application->directory}/extensions/" . Request::i()->extapp . '/' . Request::i()->type . "/{$values['dev_extensions_classname']}.php", $contents );
$this->_writeJson( ROOT_PATH . "/applications/{$this->application->directory}/data/extensions.json", $this->application->buildExtensionsJson() );
/* Clear cache */
try
{
unset( Store::i()->extensions );
}
catch( OutOfRangeException ){}
Output::i()->redirect( Url::internal( "app=core&module=developer&controller=extensions&appKey={$this->application->directory}&root=" . Request::i()->extapp . '/' . Request::i()->type ), 'file_created' );
}
@@ -326,6 +335,14 @@ class extensions extends Controller
}
$this->_writeJson( ROOT_PATH . "/applications/{$this->application->directory}/data/extensions.json", $this->application->buildExtensionsJson() );
/* Clear cache */
try
{
unset( Store::i()->extensions );
}
catch( OutOfRangeException ){}
Output::i()->redirect( Url::internal( "app=core&module=developer&controller=extensions&appKey={$this->application->directory}" ), 'deleted' );
}
}