Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

@@ -99,7 +99,7 @@ class _Theme extends \IPS\cms\Theme
foreach( new \DirectoryIterator( $path . '/' . $group->getFilename() ) as $file )
{
if ( $file->isDot() || mb_substr( $file->getFilename(), -6 ) !== '.phtml')
if ( $file->isDot() || ( mb_substr( $file->getFilename(), -6 ) !== '.phtml' and mb_substr( $file->getFilename(), -3 ) !== '.js' and mb_substr( $file->getFilename(), -4 ) !== '.css' ) )
{
continue;
}
@@ -108,7 +108,7 @@ class _Theme extends \IPS\cms\Theme
$html = file_get_contents( $path . '/' . $group->getFilename() . '/' . $file->getFilename() );
/* Parse the header tag */
preg_match( '/^<ips:template parameters="(.+?)?"([^>]+?)>(\r\n?|\n)/', $html, $params );
preg_match( '/^<ips:template parameters="([^"]+?)?"([^>]+?)>(\r\n?|\n)/', $html, $params );
/* Strip it */
$html = ( isset($params[0]) ) ? str_replace( $params[0], '', $html ) : $html;
@@ -117,7 +117,7 @@ class _Theme extends \IPS\cms\Theme
if ( isset( $params[2] ) and mb_stristr( $params[2], 'original_group' ) )
{
preg_match( '#original_group="(.+?)"#', $params[2], $submatches );
preg_match( '#original_group="(.+?)?"#', $params[2], $submatches );
if ( isset( $submatches[1] ) )
{
@@ -133,7 +133,7 @@ class _Theme extends \IPS\cms\Theme
if ( isset( $templates[ $key ] ) )
{
if ( md5( trim( $templates[ $key ]['template_content'] ) ) == md5( trim( $html ) ) )
if ( md5( trim( $templates[ $key ]['template_content'] ) ) == md5( trim( $html ) ) and 1==2 )
{
continue;
}
@@ -144,8 +144,9 @@ class _Theme extends \IPS\cms\Theme
{
$added = TRUE;
\IPS\Db::i()->update( 'cms_templates', array(
'template_content' => $html,
'template_params' => ( isset($params[1]) ) ? $params[1] : '',
'template_content' => $html,
'template_params' => ( isset($params[1]) ) ? $params[1] : '',
'template_file_object' => NULL
), array( 'template_id=?', $templates[ $key ]['template_id'] ) );
}
}