Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

@@ -73,6 +73,8 @@ class _templates extends \IPS\Dispatcher\Controller
$tempFile = tempnam( \IPS\TEMP_DIRECTORY, 'IPS' );
move_uploaded_file( $values['cms_templates_import'], $tempFile );
\IPS\Session::i()->log( 'acplogs__cms_imported_templates' );
/* Initate a redirector */
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=pages&controller=templates&do=importProcess' )->csrf()->setQueryString( array( 'file' => $tempFile, 'key' => md5_file( $tempFile ) ) ) );
}
@@ -127,16 +129,16 @@ class _templates extends \IPS\Dispatcher\Controller
*/
public function conflicts()
{
$key = \intval( \IPS\Request::i()->key );
$key = \IPS\Request::i()->key;
$form = new \IPS\Helpers\Form( 'form', 'theme_conflict_save' );
$conflicts = array();
/* If this is part of plugin/app installation, set relevant form data */
if( \IPS\Request::i()->app OR \IPS\Request::i()->plugin )
if( \IPS\Request::i()->application OR \IPS\Request::i()->plugin )
{
if( \IPS\Request::i()->app )
if( \IPS\Request::i()->application )
{
$form->hiddenValues['app'] = \IPS\Request::i()->app;
$form->hiddenValues['application'] = \IPS\Request::i()->application;
}
elseif( \IPS\Request::i()->plugin )
{
@@ -177,7 +179,7 @@ class _templates extends \IPS\Dispatcher\Controller
}
else
{
$conflicts[ $cid ]['diff'] = \IPS\Theme::i()->getTemplate( 'customization' )->templateConflictLarge( $template->content, $data['conflict_content'], 'html' );
$conflicts[ $cid ]['diff'] = \IPS\Theme::i()->getTemplate( 'customization', 'core' )->templateConflictLarge( $template->content, $data['conflict_content'], 'html' );
$conflicts[ $cid ]['large'] = true;
}
@@ -258,7 +260,7 @@ class _templates extends \IPS\Dispatcher\Controller
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=marketplace&controller=marketplace&do=viewFile&id=' . $values['marketplace'] ), $lang );
}
elseif( !empty( $values['app'] ) )
elseif( !empty( $values['application'] ) )
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=applications&controller=applications' ), $lang );
}
@@ -303,6 +305,9 @@ class _templates extends \IPS\Dispatcher\Controller
{
\IPS\Output::i()->error( 'cms_no_templates_selected', '1T285/1', 403, '' );
}
\IPS\Session::i()->log( 'acplogs__cms_exported_templates' );
\IPS\Output::i()->sendOutput( $xml->outputMemory(), 200, 'application/xml', array( 'Content-Disposition' => \IPS\Output::getContentDisposition( 'attachment', "pages_templates.xml" ) ) );
}
@@ -457,6 +462,8 @@ class _templates extends \IPS\Dispatcher\Controller
'name' => $values['container_name'],
'type' => 'template_' . $type
) );
\IPS\Session::i()->log( 'acplogs__cms_template_container', array( $container->title => false ) );
if( \IPS\Request::i()->isAjax() )
{
@@ -760,6 +767,8 @@ class _templates extends \IPS\Dispatcher\Controller
$newTemplate = \IPS\cms\Templates::add( $save );
}
\IPS\Session::i()->log( 'acplogs__cms_template_add', array( $newTemplate->title => false ) );
/* Done */
if( \IPS\Request::i()->isAjax() )
{
@@ -803,6 +812,8 @@ class _templates extends \IPS\Dispatcher\Controller
'template_content' => NULL,
'template_id' => NULL
);
$originalTemplate = \IPS\cms\Templates::load( $key );
try
{
@@ -831,6 +842,8 @@ class _templates extends \IPS\Dispatcher\Controller
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
\IPS\Session::i()->log( 'acplogs__cms_template_delete', array( $originalTemplate->title => false ) );
if( \IPS\Request::i()->isAjax() )
{
\IPS\Output::i()->json( $return );
@@ -947,6 +960,8 @@ class _templates extends \IPS\Dispatcher\Controller
/* Clear block caches */
\IPS\cms\Blocks\Block::deleteCompiled();
\IPS\Session::i()->log( 'acplogs__cms_template_save', array( \IPS\Request::i()->t_name => false ) );
if( \IPS\Request::i()->isAjax() )
{
@@ -1093,6 +1108,8 @@ class _templates extends \IPS\Dispatcher\Controller
\IPS\Db::i()->delete( 'cms_templates', array( 'template_location=? and template_group=?', 'database', \IPS\Request::i()->group ) );
unset( \IPS\Data\Store::i()->cms_databases );
\IPS\Session::i()->log( 'acplogs__cms_template_group_delete', array( \IPS\Request::i()->group => false ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=pages&controller=templates' . ( isset( \IPS\Request::i()->t_location ) ? '&t_location=' . \IPS\Request::i()->t_location : '' ) ), 'deleted' );
}