Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -600,6 +600,8 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
$form->addMessage( 'cms_templates_export_description_app', 'ipsMessage ipsMessage_general' );
|
||||
}
|
||||
|
||||
$templates = [];
|
||||
|
||||
foreach( \IPS\cms\Templates::getTemplates( \IPS\cms\Templates::RETURN_DATABASE_ONLY + \IPS\cms\Templates::RETURN_ALL ) as $template )
|
||||
{
|
||||
$title = \IPS\cms\Templates::readableGroupName( $template->group );
|
||||
@@ -816,15 +818,15 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
public static function importUserTemplateXml( string $filePath=NULL, string $fileContents=NULL ):? \IPS\Http\Url\Internal
|
||||
{
|
||||
/* Open XML file */
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
|
||||
if( $filePath )
|
||||
{
|
||||
$xml->open( $filePath );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( $filePath );
|
||||
}
|
||||
elseif( $fileContents )
|
||||
{
|
||||
if( !$xml->xml( $fileContents ) )
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
|
||||
if( !$xml->xml( $fileContents, NULL, LIBXML_NONET ) )
|
||||
{
|
||||
throw \UnexpectedValueException('bad_xml_string');
|
||||
}
|
||||
@@ -1027,8 +1029,7 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
}
|
||||
|
||||
/* Open XML file */
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
$xml->open( $file );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( $file );
|
||||
$xml->read();
|
||||
|
||||
while( $xml->read() )
|
||||
@@ -1162,6 +1163,16 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
if ( isset( static::$multitons[ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitons[ $this->id ] );
|
||||
|
||||
if( isset( static::$multitonMap['template_id'][ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_id'][ $this->id ] );
|
||||
}
|
||||
|
||||
if( isset( static::$multitonMap['template_key'][ $this->key ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_key'][ $this->key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1173,6 +1184,16 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
if ( isset( static::$multitons[ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitons[ $this->id ] );
|
||||
|
||||
if( isset( static::$multitonMap['template_id'][ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_id'][ $this->id ] );
|
||||
}
|
||||
|
||||
if( isset( static::$multitonMap['template_key'][ $this->key ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_key'][ $this->key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user