Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+12 -4
View File
@@ -99,7 +99,7 @@ class _LegacyParser
/**
* @brief Parser object
*/
protected $parser = NULL;
public $parser = NULL;
/**
* @brief Key for attachments
@@ -126,6 +126,11 @@ class _LegacyParser
*/
protected $idThree = 0;
/**
* @brief Are Acronyms Supported?
*/
protected static $_newAcronyms = null;
/**
* Constructor
*
@@ -176,14 +181,17 @@ class _LegacyParser
}
/* The `a_type` column is added in 4.5, so we need to account for this if running the legacy parser during an older upgrade */
$newAcronyms = \IPS\Db::i()->checkForColumn( 'core_acronyms', 'a_type' );
if( static::$_newAcronyms === NULL )
{
static::$_newAcronyms = \IPS\Db::i()->checkForColumn( 'core_acronyms', 'a_type' );
}
/* Grab a new parser object */
\IPS\Text\Parser::$requestTimeout = 1;
$this->parser = new \IPS\Text\Parser( TRUE, $this->idOne ? array( $this->idOne, $this->idTwo, $this->idThree ) : NULL, $this->member, $this->attachClass, TRUE, ( $this->allowHtml ? FALSE : TRUE ), NULL, $newAcronyms );
$this->parser = new \IPS\Text\Parser( TRUE, $this->idOne ? array( $this->idOne, $this->idTwo, $this->idThree ) : NULL, $this->member, $this->attachClass, TRUE, ( $this->allowHtml ? FALSE : TRUE ), NULL, static::$_newAcronyms );
/* If we're in the upgrader and the new acronym support hasn't been added yet, populate acronyms manually */
if( !$newAcronyms )
if( !static::$_newAcronyms )
{
$this->parser->caseSensitiveAcronyms = iterator_to_array( \IPS\Db::i()->select( array( 'a_short', 'a_long', "'acronym' as `a_type`" ), 'core_acronyms', array( 'a_casesensitive=1' ) )->setKeyField( 'a_short' ) );