Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+1 -1
View File
@@ -294,7 +294,7 @@ class _Reply extends \IPS\Content\Comment implements \IPS\Content\Hideable
if ( !in_array( $staffId, $sentTo ) and ( $this->item()->department->staff === '*' or in_array( $staffId, explode( ',', $this->item()->department->staff ) ) ) )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', $this->type === static::REPLY_HIDDEN ? 'staffNotifyNote' : 'staffNotifyReply', array( $this ) );
$email->from = $this->item()->department->email;
$email->from = ( $this->item()->department->email ) ? $this->item()->department->email : \IPS\Settings::i()->email_out;
switch ( \IPS\Settings::i()->nexus_sout_from )
{
case 'staff':
@@ -256,7 +256,7 @@ class _Request extends \IPS\Content\Item implements \IPS\Content\ReadMarkers
}
else
{
return htmlentities( $row['r_email'], \IPS\HTMLENTITIES, 'UTF-8', FALSE );
return htmlspecialchars( $row['r_email'], \IPS\HTMLENTITIES, 'UTF-8', FALSE );
}
},
'r_last_reply_by' => function( $val, $row )
@@ -773,7 +773,7 @@ class _Request extends \IPS\Content\Item implements \IPS\Content\ReadMarkers
$invoice->member = \IPS\nexus\Customer::loggedIn();
$invoice->return_uri = "app=nexus&module=support&controller=home&do=create&department={$department->id}&title=" . urlencode( $values['support_title'] );
$item = new \IPS\nexus\extensions\nexus\Item\SupportCharge( $department->_title, $ppiCost );
$item = new \IPS\nexus\extensions\nexus\Item\SupportCharge( \IPS\Member::loggedIn()->language()->get( 'nexus_department_' . $department->_id ), $ppiCost );
$item->id = $department->id;
if ( $department->ppi_tax )
{
@@ -900,6 +900,8 @@ class _Request extends \IPS\Content\Item implements \IPS\Content\ReadMarkers
}
parent::processAfterCreate( $comment, $values );
$this->sendNotifications();
}
/**
@@ -1348,7 +1350,7 @@ class _Request extends \IPS\Content\Item implements \IPS\Content\ReadMarkers
if ( $this->department->staff === '*' or count( array_intersect( \IPS\nexus\Support\Department::staffDepartmentPerms( $member ), explode( ',', $this->department->staff ) ) ) )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', 'staffNotifyNew', array( $this ) );
$email->from = $this->department->email;
$email->from = ( $this->department->email ) ? $this->department->email : \IPS\Settings::i()->email_out;
switch ( \IPS\Settings::i()->nexus_sout_from )
{
case 'staff':
@@ -258,4 +258,20 @@ class _Status extends \IPS\Node\Model
return $buttons;
}
/**
* [ActiveRecord] Duplicate
*
* @return void
*/
public function __clone()
{
$oldId = $this->_id;
parent::__clone();
\IPS\Lang::saveCustom( 'nexus', "nexus_status_{$this->id}_admin", iterator_to_array( \IPS\Db::i()->select( 'CONCAT(word_custom, \' ' . \IPS\Member::loggedIn()->language()->get('copy_noun') . '\') as word_custom, lang_id', 'core_sys_lang_words', array( 'word_key=?', "nexus_status_{$oldId}_admin" ) )->setKeyField( 'lang_id' )->setValueField('word_custom') ) );
\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') ) );
}
}