Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -210,8 +210,8 @@ class _Application extends \IPS\Application
|
||||
*/
|
||||
public function installOther()
|
||||
{
|
||||
/* Disable hosting support for new installations */
|
||||
\IPS\Db::i()->update( 'core_modules', array( 'sys_module_visible' => 0 ), array( 'sys_module_application=? AND sys_module_key=? AND sys_module_area=?', 'nexus', 'hosting', 'admin' ) );
|
||||
/* Disable support module for new installations */
|
||||
\IPS\Db::i()->update( 'core_modules', array( 'sys_module_visible' => 0 ), array( 'sys_module_application=? AND sys_module_key=? AND sys_module_area=?', 'nexus', 'support', 'admin' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,46 +223,41 @@ class _Application extends \IPS\Application
|
||||
{
|
||||
$menu = parent::acpMenu();
|
||||
|
||||
if( $m = \IPS\Application\Module::get( 'nexus', 'hosting', 'admin' ) AND $m->visible )
|
||||
if( $m = \IPS\Application\Module::get( 'nexus', 'support', 'admin' ) AND $m->visible )
|
||||
{
|
||||
$menu['hosting'] = array(
|
||||
'queues' => array(
|
||||
$menu['support'] = array(
|
||||
'requests' => array(
|
||||
'tab' => 'nexus',
|
||||
'controller' => 'queues',
|
||||
'controller' => 'requests',
|
||||
'do' => '',
|
||||
'restriction' => 'queues_manage'
|
||||
'restriction' => 'requests_manage',
|
||||
'subcontrollers' => 'request'
|
||||
),
|
||||
'servers' => array(
|
||||
'reports' => array(
|
||||
'tab' => 'nexus',
|
||||
'controller' => 'servers',
|
||||
'controller' => 'reports',
|
||||
'do' => '',
|
||||
'restriction' => 'servers_manage'
|
||||
),
|
||||
'monitoring' => array(
|
||||
'tab' => 'nexus',
|
||||
'controller' => 'monitoring',
|
||||
'do' => '',
|
||||
'restriction' => null
|
||||
),
|
||||
'errors' => array(
|
||||
'tab' => 'nexus',
|
||||
'controller' => 'errors',
|
||||
'do' => '',
|
||||
'restriction' => 'errors_manage'
|
||||
'restriction' => 'reports_manage'
|
||||
),
|
||||
'settings' => array(
|
||||
'tab' => 'nexus',
|
||||
'controller' => 'settings',
|
||||
'do' => '',
|
||||
'restriction' => 'settings_manage'
|
||||
)
|
||||
),
|
||||
'volume' => array(
|
||||
'tab' => 'stats',
|
||||
'controller' => 'volume',
|
||||
'do' => '',
|
||||
'restriction' => 'volume_manage'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return $menu;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Cached menu counts
|
||||
*/
|
||||
@@ -314,15 +309,6 @@ class _Application extends \IPS\Application
|
||||
|
||||
return $this->menuCounts['requests'];
|
||||
break;
|
||||
|
||||
case 'errors':
|
||||
if( !isset( $this->menuCounts['errors'] ) )
|
||||
{
|
||||
$this->menuCounts['errors'] = \IPS\Db::i()->select( 'COUNT(*)', 'nexus_hosting_errors' )->first();
|
||||
}
|
||||
|
||||
return $this->menuCounts['errors'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,8 +477,7 @@ class _Application extends \IPS\Application
|
||||
'title' => 'default_menu_item_support',
|
||||
'config' => array( 'menu_custom_item_url' => 'app=nexus&module=support&controller=home', 'internal' => 'support' ),
|
||||
'children' => array(
|
||||
array( 'key' => 'Support' ),
|
||||
array( 'key' => 'NetworkStatus' ),
|
||||
array( 'key' => 'Support' )
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -503,35 +488,6 @@ class _Application extends \IPS\Application
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Extensions - Deprecate Hosting Utilities
|
||||
*
|
||||
* @param \IPS\Application|string $app The app key of the application which owns the extension
|
||||
* @param string $extension Extension Type
|
||||
* @param bool $construct Should an object be returned? (If false, just the classname will be returned)
|
||||
* @param \IPS\Member|\IPS\Member\Group|bool $checkAccess Check access permission for extension against supplied member/group (or logged in member, if TRUE)
|
||||
* @return array
|
||||
*/
|
||||
public function extensions( $app, $extension, $construct=TRUE, $checkAccess=FALSE )
|
||||
{
|
||||
$extensions = parent::extensions( $app, $extension, $construct, $checkAccess );
|
||||
|
||||
/* If Item extension and hosting support is hidden, we'll need to remove the hosting specific items that are deprecated */
|
||||
if( $extension == 'Item' AND $m = \IPS\Application\Module::get( 'nexus', 'hosting', 'admin' ) AND !$m->visible )
|
||||
{
|
||||
$deprecated = array( 'Bandwidth', 'DedicatedServer', 'Domain' );
|
||||
foreach( $extensions as $key => $class )
|
||||
{
|
||||
if( \in_array( $key, $deprecated ) )
|
||||
{
|
||||
unset( $extensions[ $key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $extensions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform some legacy URL parameter conversions
|
||||
*
|
||||
* @return void
|
||||
@@ -572,4 +528,15 @@ class _Application extends \IPS\Application
|
||||
return $hooks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of essential cookies which are set by this app.
|
||||
* Wildcards (*) can be used at the end of cookie names for PHP set cookies.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function _getEssentialCookieNames(): array
|
||||
{
|
||||
return [ 'cm_reg', 'location', 'currency', 'guestTransactionKey' ];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user