plesk / whmcs-plugin

Other
16 stars 33 forks source link

bug exclusive ip-address in _getFreeDedicatedIp #20

Closed elnarvi closed 4 years ago

elnarvi commented 7 years ago

The dedicated reseller IPs included them in free IPS ... Attached patch for _getFreeDedicatedIp() function

Sorry for my English... xD

elnarvi commented 7 years ago

/lib/Plesk/Manager/V1632.php

After:

foreach($domains->xpath('//webspace/get/result') as $item) { try { $this->_checkErrors($item); foreach($item->data->hosting->vrt_hst->ip_address as $ip) { $ipListUse[(string)$ip] = (string)$ip; } } catch (Exception $e) { if (Plesk_Api::ERROR_OBJECT_NOT_FOUND != $e->getCode()) { throw $e; } } }

Included:

$resellers = Plesk_Registry::getInstance()->api->resellers_get(); if(isset($resellers) && !empty($resellers)) { foreach($resellers->xpath('//reseller/get/result') as $item) { try { $this->_checkErrors($item); foreach($item->data->ippool->ip as $ip) { if($ip->{'ip-type'}=="exclusive") { $ipListUse[(string)$ip->{'ip-address'}] = (string)$ip->{'ip-address'}; } } } catch (Exception $e) { if (Plesk_Api::ERROR_OBJECT_NOT_FOUND != $e->getCode()) { throw $e; } } } }

/templates/api/1.6.3.2/resellers_get.tpl

`

`
n8whnp commented 7 years ago

This appears to be a duplicate of #13.

vbaranovskiy-plesk commented 4 years ago

This repository is no longer maintained. All questions regarding the WHMCS Plesk Provisioning Module should be addressed to WHMCS Technical Support. https://www.whmcs.com/submit-a-ticket/