Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -47,14 +47,7 @@ class _Theme extends \IPS\cms\Theme
'template_user_edited ASC' /* Ensure we get edited versions, not the master version if one exists */
)->setKeyField('bit_key') as $template )
{
try
{
static::writeTemplate( $template, TRUE );
}
catch( \RuntimeException $ex )
{
throw new \RuntimeException( $ex->getMessage() );
}
static::writeTemplate( $template, TRUE );
}
}
@@ -133,7 +126,7 @@ class _Theme extends \IPS\cms\Theme
if ( isset( $templates[ $key ] ) )
{
if( \IPS\Login::compareHashes( md5( trim( $html ) ), md5( trim( $templates[ $key ]['template_content'] ) ) ) )
if( md5( trim( $html ) ) == md5( trim( $templates[ $key ]['template_content'] ) ) )
{
/* No change */
continue;
+9 -3
View File
@@ -247,10 +247,16 @@ class _Theme extends \IPS\Theme
if ( ! file_exists( $path . '/' . $template['template_location'] . '/' . $template['template_group'] . '/' . $fileName ) OR $force === TRUE )
{
$write = '<ips:template parameters="' . $template['template_params'] . '" original_group="' . $template['template_original_group'] . '" key="' . $template['template_key'] . '" />' . "\n";
$write = '';
if ( $template['template_type'] === 'template' )
{
$write = '<ips:template parameters="' . $template['template_params'] . '" original_group="' . $template['template_original_group'] . '" key="' . $template['template_key'] . '" />' . "\n";
}
$write .= $template['template_content'];
if ( ! @\file_put_contents( $path . '/' . $template['template_location'] . '/' . $template['template_group'] . '/' . $fileName, $write ) )
if ( @\file_put_contents( $path . '/' . $template['template_location'] . '/' . $template['template_group'] . '/' . $fileName, $write ) === FALSE )
{
throw new \RuntimeException( \IPS\Member::loggedIn()->language()->addToStack( 'content_theme_dev_cannot_write_template', FALSE, array( 'sprintf' => array( $path . '/' . $template['template_location'] . '/' . $template['template_group'] . '/' . $fileName ) ) ) );
}
@@ -349,7 +355,7 @@ class _Theme extends \IPS\Theme
if ( in_array( $key, $seenKeys ) )
{
$key .= filemtime( static::_getHtmlPath( 'cms', $location->getFilename(), $file->getFilename() ) . '/' . $template->getFilename() ) . uniqid();
$key .= filemtime( static::_getHtmlPath( 'cms', $location->getFilename(), $file->getFilename() ) . '/' . $template->getFilename() ) . mt_rand();
}
$seenKeys[] = $key;