Fixed: WebsitePanel error codes not being converted properly
This commit is contained in:
parent
a2c0a6b6eb
commit
880e35c634
2 changed files with 19 additions and 11 deletions
|
@ -39,8 +39,13 @@
|
||||||
/**
|
/**
|
||||||
* Common error codes encountered while using the WebsitePanel Server Module
|
* Common error codes encountered while using the WebsitePanel Server Module
|
||||||
* These are not all the Enterprise Server error codes, only the ones I have encountered using the API
|
* These are not all the Enterprise Server error codes, only the ones I have encountered using the API
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
$esErrorCodes = array(-100 => 'User already exists',
|
function websitepanel_GetEnterpriseServerErrors()
|
||||||
|
{
|
||||||
|
$esErrorCodes = array(-100 => 'User already exists',
|
||||||
-101 => 'User not found',
|
-101 => 'User not found',
|
||||||
-102 => 'User has child user accounts',
|
-102 => 'User has child user accounts',
|
||||||
-300 => 'Hosting package could not be found',
|
-300 => 'Hosting package could not be found',
|
||||||
|
@ -51,3 +56,5 @@ $esErrorCodes = array(-100 => 'User already exists',
|
||||||
-601 => 'The website already exists on the target hosting space',
|
-601 => 'The website already exists on the target hosting space',
|
||||||
-700 => 'The email domain already exists on the target hosting space',
|
-700 => 'The email domain already exists on the target hosting space',
|
||||||
-1100 => 'User already exists');
|
-1100 => 'User already exists');
|
||||||
|
return $esErrorCodes;
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ function websitepanel_GetErrorMessage($code)
|
||||||
|
|
||||||
// Include the common / known error codes
|
// Include the common / known error codes
|
||||||
require_once(ROOTDIR . '/modules/servers/websitepanel/websitepanel.errorcodes.php');
|
require_once(ROOTDIR . '/modules/servers/websitepanel/websitepanel.errorcodes.php');
|
||||||
|
$esErrorCodes = websitepanel_GetEnterpriseServerErrors();
|
||||||
|
|
||||||
// Check if the error code exists, if not return the code
|
// Check if the error code exists, if not return the code
|
||||||
if (array_key_exists($code, $esErrorCodes))
|
if (array_key_exists($code, $esErrorCodes))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue