Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+13 -8
View File
@@ -2,9 +2,9 @@
/**
* @brief Hosting Server Model
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @subpackage Nexus
* @since 6 Aug 2014
* @version SVN_VERSION_NUMBER
@@ -46,6 +46,11 @@ class _Server extends \IPS\Node\Model
*/
protected static $databaseIdFields = array( 'server_hostname', 'server_dedicated' );
/**
* @brief [ActiveRecord] Multiton Map
*/
protected static $multitonMap = array();
/**
* Construct ActiveRecord from database row
*
@@ -185,7 +190,7 @@ class _Server extends \IPS\Node\Model
$form->add( new \IPS\Helpers\Form\Stack( 'server_nameservers', $nameservers, NULL, array( 'placeholder' => 'ns.example.net' ), NULL, NULL, NULL, 'server_nameservers' ) );
$form->addHeader( 'server_reporting' );
$form->add( new \IPS\Helpers\Form\YesNo( 'server_monitor_on', \IPS\Settings::i()->monitoring_script and $this->monitor, FALSE, array( 'disabled' => !\IPS\Settings::i()->monitoring_script, 'togglesOn' => array( 'server_monitor' ) ) ) );
$form->add( new \IPS\Helpers\Form\Url( 'server_monitor', $this->monitor, NULL, array( 'placeholder' => 'http://server.example.net/monitor_remote.php' ), function( $val )
$form->add( new \IPS\Helpers\Form\Url( 'server_monitor', $this->monitor ?: '', NULL, array( 'placeholder' => 'http://server.example.net/monitor_remote.php' ), function( $val )
{
if ( !$val and \IPS\Request::i()->sever_monitor_on )
{
@@ -272,7 +277,7 @@ class _Server extends \IPS\Node\Model
{
foreach ( explode( ',', \IPS\Settings::i()->monitoring_alert ) as $address )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_online', array( $this, urlencode( $address ) ) );
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_online', array( $this, urlencode( $address ) ), \IPS\Email::TYPE_LIST );
$email->send( $address );
}
}
@@ -286,7 +291,7 @@ class _Server extends \IPS\Node\Model
{
foreach ( explode( ',', \IPS\Settings::i()->monitoring_alert ) as $address )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_offline', array( $this, urlencode( $address ) ) );
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_offline', array( $this, urlencode( $address ) ), \IPS\Email::TYPE_LIST );
$email->send( $address );
}
}
@@ -300,7 +305,7 @@ class _Server extends \IPS\Node\Model
{
foreach ( explode( ',', \IPS\Settings::i()->monitoring_alert ) as $address )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_panic', array( $this, urlencode( $address ) ) );
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_panic', array( $this, urlencode( $address ) ), \IPS\Email::TYPE_LIST );
$email->send( $address );
}
}
@@ -315,7 +320,7 @@ class _Server extends \IPS\Node\Model
{
foreach ( explode( ',', \IPS\Settings::i()->monitoring_alert ) as $address )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_acknowledged', array( $this, urlencode( $address ), $by ) );
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_acknowledged', array( $this, urlencode( $address ), $by ), \IPS\Email::TYPE_LIST );
$email->send( $address );
}
}
@@ -330,7 +335,7 @@ class _Server extends \IPS\Node\Model
{
foreach ( explode( ',', \IPS\Settings::i()->monitoring_alert ) as $address )
{
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_reset', array( $this, urlencode( $address ), $by ) );
$email = \IPS\Email::buildFromTemplate( 'nexus', 'monitoring_reset', array( $this, urlencode( $address ), $by ), \IPS\Email::TYPE_LIST );
$email->send( $address );
}
}