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

@@ -216,9 +216,10 @@ class _CustomField extends \IPS\CustomField
*
* @param mixed $value The value
* @param bool $showSensitiveInformation If TRUE, potentially sensitive data (like passwords) will be displayed - otherwise will be blanked out
* @param string $separator Used to separate items when displaying a field with multiple values.
* @return string
*/
public function displayValue( $value=NULL, $showSensitiveInformation=FALSE )
public function displayValue( $value=NULL, $showSensitiveInformation=FALSE, $separator=NULL )
{
if ( $this->type === 'UserPass' )
{
@@ -62,6 +62,11 @@ class _Department extends \IPS\Node\Model
* @brief [Node] Title prefix. If specified, will look for a language key with "{$key}_title" as the key
*/
public static $titleLangPrefix = 'nexus_department_';
/**
* @brief [Node] Description suffix. If specified, will look for a language key with "{$titleLangPrefix}_{$id}_{$descriptionLangSuffix}" as the key
*/
public static $descriptionLangSuffix = '_desc';
/**
* @brief [Node] ACP Restrictions
@@ -1186,7 +1186,7 @@ class _Request extends \IPS\Content\Item implements \IPS\Content\ReadMarkers
}
/* Mark it as read */
$this->markRead();
$this->markRead( NULL, NULL, NULL, TRUE );
/* Redirect */
$this->_staffFormRedirect( $pendingData, FALSE );
@@ -62,6 +62,11 @@ class _Severity extends \IPS\Node\Model
* @brief [Node] Title prefix. If specified, will look for a language key with "{$key}_title" as the key
*/
public static $titleLangPrefix = 'nexus_severity_';
/**
* @brief [Node] Description suffix. If specified, will look for a language key with "{$titleLangPrefix}_{$id}_{$descriptionLangSuffix}" as the key
*/
public static $descriptionLangSuffix = '_desc';
/**
* @brief [Node] ACP Restrictions
+15 -1
View File
@@ -299,7 +299,7 @@ class _Status extends \IPS\Node\Model
public function getButtons( $url, $subnode=FALSE )
{
$buttons = parent::getButtons( $url, $subnode );
if ( isset( $buttons['delete'] ) and \IPS\Db::i()->select( 'COUNT(*)', 'nexus_support_requests', array( 'r_status=?', $this->id ) ) )
if ( isset( $buttons['delete'] ) and \IPS\Db::i()->select( 'COUNT(*)', 'nexus_support_requests', array( 'r_status=?', $this->id ) )->first() )
{
$buttons['delete']['data'] = array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('delete') );
}
@@ -322,6 +322,20 @@ class _Status extends \IPS\Node\Model
\IPS\Lang::saveCustom( 'nexus', "nexus_status_{$this->id}_front", iterator_to_array( \IPS\Db::i()->select( 'word_custom, lang_id', 'core_sys_lang_words', array( 'word_key=?', "nexus_status_{$oldId}_front" ) )->setKeyField( 'lang_id' )->setValueField('word_custom') ) );
\IPS\Lang::saveCustom( 'nexus', "nexus_status_{$this->id}_set", iterator_to_array( \IPS\Db::i()->select( 'word_custom, lang_id', 'core_sys_lang_words', array( 'word_key=?', "nexus_status_{$oldId}_set" ) )->setKeyField( 'lang_id' )->setValueField('word_custom') ) );
}
/**
* [ActiveRecord] Delete Record
*
* @return void
*/
public function delete()
{
parent::delete();
\IPS\Lang::deleteCustom( 'nexus', "nexus_status_{$this->id}_admin" );
\IPS\Lang::deleteCustom( 'nexus', "nexus_status_{$this->id}_front" );
\IPS\Lang::deleteCustom( 'nexus', "nexus_status_{$this->id}_set" );
}
/**
* Get output for API
@@ -217,10 +217,10 @@ class _Stream extends \IPS\Patterns\ActiveRecord
$this->staff = $values['r_staff'] ?: NULL;
$this->from_email = $values['r_email'] ?: NULL;
$this->search_term = $values['r_search'] ?: NULL;
$this->started = $values['r_started'][1] ? json_encode($values['r_started']): NULL;
$this->last_new_reply = $values['r_last_new_reply'][1] ? json_encode($values['r_last_new_reply']): NULL;
$this->last_reply = $values['r_last_reply'][1] ? json_encode($values['r_last_reply']): NULL;
$this->last_staff_reply = $values['r_last_staff_reply'][1] ? json_encode($values['r_last_staff_reply']): NULL;
$this->started = ( \is_array( $values['r_started'] ) AND $values['r_started'][1] ) ? json_encode($values['r_started']): NULL;
$this->last_new_reply = ( \is_array( $values['r_last_new_reply'] ) AND $values['r_last_new_reply'][1] ) ? json_encode($values['r_last_new_reply']): NULL;
$this->last_reply = ( \is_array( $values['r_last_new_reply'] ) AND $values['r_last_reply'][1] ) ? json_encode($values['r_last_reply']): NULL;
$this->last_staff_reply = ( \is_array( $values['r_last_staff_reply'] ) AND $values['r_last_staff_reply'][1] ) ? json_encode($values['r_last_staff_reply']): NULL;
$this->tracked = (bool) $values['r_tracked'];
}
@@ -267,7 +267,7 @@ class _Stream extends \IPS\Patterns\ActiveRecord
* @param \IPS\Http\Url $url The URL to submit to
* @return \IPS\Helpers\Form
*/
public function form( Stream $selectedStream = NULL, \IPS\Http\Url $url )
public function form( ?Stream $selectedStream, \IPS\Http\Url $url )
{
/* Init */
$form = new \IPS\Helpers\Form( 'form', 'show_results', $url );