Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+10 -3
View File
@@ -765,7 +765,7 @@ class _Lang extends \IPS\Node\Model
* Add to output stack
*
* @param string $key Language key
* @param bool $vle Add VLE tags?
* @param bool|null $vle Add VLE tags?
* @param array $options Options
* @return string Unique id
*/
@@ -1455,6 +1455,7 @@ class _Lang extends \IPS\Node\Model
'icon' => 'download',
'title' => 'download',
'link' => \IPS\Http\Url::internal( "app=core&module=languages&controller=languages&do=download&id={$this->_id}" ),
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => $this->_title )
);
}
@@ -1727,7 +1728,7 @@ class _Lang extends \IPS\Node\Model
if ( mb_stristr( $output, '{dir}' ) )
{
$output = preg_replace( '#(<td\s+?)dir=([\'"]){dir}([\'"])#i', '\1dir=\2' . $dir . '\3', $output );
$output = preg_replace( '#(<td.+?)dir=([\'"]){dir}([\'"])#i', '\1dir=\2' . $dir . '\3', $output );
preg_match_all( '#<(body|html)([^>]+?)>#i', $output, $matches, PREG_SET_ORDER );
@@ -1954,7 +1955,7 @@ class _Lang extends \IPS\Node\Model
throw new \ErrorException;
}
}
catch ( \ErrorException $e )
catch ( \Throwable $e )
{
// If there's the wrong number of parameters because the translator's done it wrong, we can just use empty strings for replacements
}
@@ -2050,6 +2051,12 @@ class _Lang extends \IPS\Node\Model
$replacement = \IPS\Text\Parser::removeLazyLoad( $replacement );
}
/* Remove newlines and any whitespace */
if ( isset( $values[ 'options' ][ 'removeNewlines' ] ) )
{
$replacement = trim( preg_replace( "#\n\s+?#", " ", $replacement ) );
}
$replacements[ $key ] = $replacement;
}