Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+17 -12
View File
@@ -11,29 +11,35 @@
namespace IPS\Lang\Setup;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Db;
use UnderflowException;
use function count;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* Setup Language Class
*/
class _Lang extends \IPS\_Lang
class Lang extends \IPS\Lang
{
/**
* Add to output stack
*
* @param string $key Language key
* @param bool $vle Add VLE tags?
* @param array $options Options
* @param string $key Language key
* @param bool|null $vle Add VLE tags?
* @param array $options Options
* @return string Unique id
*/
public function addToStack( $key, $vle=TRUE, $options=array() )
public function addToStack( string $key, ?bool $vle=TRUE, array $options=array() ): string
{
/* if we don't have any options, there's no need to add it to the stack */
if( \count($options) == 0 )
if( count($options) == 0 )
{
return ( isset( $this->words[ $key ] ) ) ? $this->words[ $key ] : $key;
}
@@ -50,14 +56,13 @@ class _Lang extends \IPS\_Lang
/**
* Parse output and replace language keys
*
* @param string $output Unparsed
* @param string $output Unparsed
* @return void
*/
public function parseOutputForDisplay( &$output )
public function parseOutputForDisplay( mixed &$output ) : void
{
/* Do we actually have any? */
if( !\count( $this->outputStack ) )
if( !count( $this->outputStack ) )
{
return;
}