Fixed: WebsitePanel error codes not being converted properly

This commit is contained in:
Christopher York 2013-01-29 12:32:54 -06:00
parent a2c0a6b6eb
commit 880e35c634
2 changed files with 19 additions and 11 deletions

View file

@ -39,15 +39,22 @@
/**
* 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
*
* @access public
* @return array
*/
$esErrorCodes = array(-100 => 'User already exists',
-101 => 'User not found',
-102 => 'User has child user accounts',
-300 => 'Hosting package could not be found',
-301 => 'Hosting package has child hosting spaces',
-501 => 'The sub-domain belongs to an existing hosting space that does not allow sub-domains to be created',
-502 => 'The domain or sub-domain exists within another hosting space',
-511 => 'Instant alias is enabled, but not configured',
-601 => 'The website already exists on the target hosting space',
-700 => 'The email domain already exists on the target hosting space',
-1100 => 'User already exists');
function websitepanel_GetEnterpriseServerErrors()
{
$esErrorCodes = array(-100 => 'User already exists',
-101 => 'User not found',
-102 => 'User has child user accounts',
-300 => 'Hosting package could not be found',
-301 => 'Hosting package has child hosting spaces',
-501 => 'The sub-domain belongs to an existing hosting space that does not allow sub-domains to be created',
-502 => 'The domain or sub-domain exists within another hosting space',
-511 => 'Instant alias is enabled, but not configured',
-601 => 'The website already exists on the target hosting space',
-700 => 'The email domain already exists on the target hosting space',
-1100 => 'User already exists');
return $esErrorCodes;
}

View file

@ -50,6 +50,7 @@ function websitepanel_GetErrorMessage($code)
// Include the common / known error codes
require_once(ROOTDIR . '/modules/servers/websitepanel/websitepanel.errorcodes.php');
$esErrorCodes = websitepanel_GetEnterpriseServerErrors();
// Check if the error code exists, if not return the code
if (array_key_exists($code, $esErrorCodes))