Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -234,7 +234,7 @@ class _blocks extends \IPS\Node\Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadTags(): void
|
||||
public function loadTags()
|
||||
{
|
||||
$tags = array();
|
||||
$tagLinks = array();
|
||||
@@ -257,4 +257,32 @@ class _blocks extends \IPS\Node\Controller
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->editorTags( $tags, $tagLinks ) ), 200, 'text/html' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the custom code to use for a block preview
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function storeTemporaryBlock()
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
$key = md5( mt_rand() );
|
||||
|
||||
while( isset( \IPS\Data\Store::i()->$key ) )
|
||||
{
|
||||
$key = md5( mt_rand() );
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
foreach( \IPS\Request::i() as $k => $v )
|
||||
{
|
||||
$data[ $k ] = $v;
|
||||
}
|
||||
|
||||
\IPS\Data\Store::i()->$key = $data;
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=cms&module=pages&controller=builder&do=previewBlock&_key=" . $key, 'front' ) );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user