Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+49 -14
View File
@@ -23,6 +23,16 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
*/
class _Application extends \IPS\Application
{
/**
* [Node] Get Node Description
*
* @return string|null
*/
protected function get__description()
{
return NULL;
}
/**
* [Node] Get Icon for tree
*
@@ -34,6 +44,32 @@ class _Application extends \IPS\Application
return 'random';
}
/**
* [Node] Get whether or not this node is locked to current enabled/disabled status
*
* @note Return value NULL indicates the node cannot be enabled/disabled
* @return bool|null
*/
protected function get__locked()
{
/* We don't allow the application to be disabled since its hooks are required for redirects */
return TRUE;
}
public function getButtons( $url, $subnode=FALSE )
{
$buttons = parent::getButtons( $url, $subnode );
if( isset( $buttons['delete'] ) )
{
$buttons['delete']['title'] = 'uninstall';
$buttons['delete']['data']['delete-message'] = \IPS\Member::loggedIn()->language()->addToStack('converter_uninstall');
$buttons['delete']['data']['delete-warning'] = \IPS\Member::loggedIn()->language()->addToStack('converter_uninstall_warning');
}
return $buttons;
}
/**
* Install Other
*
@@ -45,23 +81,22 @@ class _Application extends \IPS\Application
try
{
\IPS\Db::i()->select( '*', 'core_login_handlers', array( "login_key=?", 'Convert' ) )->first();
\IPS\Db::i()->select( '*', 'core_login_methods', array( "login_classname=?", 'IPS\\convert\\Login' ) )->first();
}
catch( \UnderflowException $e )
{
$position = \IPS\Db::i()->select( 'MAX(login_order)', 'core_login_handlers' )->first();
\IPS\Db::i()->insert( 'core_login_handlers', array(
'login_key' => "Convert",
'login_enabled' => 1,
'login_settings' => json_encode( array( 'auth_types' => \IPS\Login::AUTH_TYPE_USERNAME + \IPS\Login::AUTH_TYPE_EMAIL ) ),
'login_order' => $position + 1,
'login_acp' => 1
) );
if ( isset( \IPS\Data\Store::i()->loginHandlers ) )
{
unset( \IPS\Data\Store::i()->loginHandlers );
}
$position = \IPS\Db::i()->select( 'MAX(login_order)', 'core_login_methods' )->first();
$handler = new \IPS\convert\Login;
$handler->classname = 'IPS\\convert\\Login';
$handler->order = $position + 1;
$handler->acp = TRUE;
$handler->settings = array( 'auth_types' => \IPS\Login::AUTH_TYPE_USERNAME + \IPS\Login::AUTH_TYPE_EMAIL );
$handler->enabled = TRUE;
$handler->register = FALSE;
$handler->save();
\IPS\Lang::saveCustom( 'core', "login_method_{$handler->id}", 'Converter' );
}
}