Navigation Menu

Skip to content

Commit

Permalink
Remove value requirement for park()'s 'topdomain' argument
Browse files Browse the repository at this point in the history
Case 51116: The $topdomain arguement for API2 Park::park, technically,
is an optional argument.  This change alters the requirment for the helper
method, park(), such that the caller does not have specific it (which will
cause the parked domain to be done against the primary domain of the
$username's account).
  • Loading branch information
davidneimeyer committed Jun 29, 2011
1 parent f77efcf commit 93cb441
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
@@ -1,5 +1,8 @@
CHANGELOG.txt for xmlapi.php

1.0.11:
- [Feature]: Remove value requirement for park()'s 'topdomain' argument

1.0.10:
- github#1 - [Bugfix]: setresellerpackagelimits() does not properly prepare
input arguments for query (Case 51076)
Expand Down
20 changes: 13 additions & 7 deletions xmlapi.php
Expand Up @@ -29,11 +29,15 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Version: 1.0.10
* Last updated: 27 June 2011
* Version: 1.0.11
* Last updated: 29 June 2011
*
* Changes
*
* 1.0.11:
* [Feature]: Remove value requirement for park()'s 'topdomain' argument
* (Case 51116)
*
* 1.0.10:
* github#1 - [Bugfix]: setresellerpackagelimits() does not properly prepare
* input arguments for query (Case 51076)
Expand Down Expand Up @@ -86,7 +90,7 @@
*
* @copyright 2011 cPanel, Inc
* @license http://sdk.cpanel.net/license/bsd.html
* @version 1.0.10
* @version 1.0.11
* @link http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi
* @since File available since release 0.1
**/
Expand Down Expand Up @@ -114,7 +118,7 @@
* @package xmlapi
* @copyright 2011 cPanel, Inc.
* @license http://sdk.cpanel.net/license/bsd.html
* @version Release: 1.0.10
* @version Release: 1.0.11
* @link http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi
* @since Class available since release 0.1
**/
Expand Down Expand Up @@ -2119,12 +2123,14 @@ public function addpop($username, $args) {
// This API function displays a list of all parked domains for a specific user.
public function park($username, $newdomain, $topdomain) {
$args = array();
if ( (!isset($username)) && (!isset($newdomain)) && (!isset($topdomain)) ) {
error_log("park requires that a username, new domain and topdomain are passed to it");
if ( (!isset($username)) && (!isset($newdomain)) ) {
error_log("park requires that a username and new domain are passed to it");
return false;
}
$args['domain'] = $newdomain;
$args['topdomain'] = $topdomain;
if ($topdomain) {
$args['topdomain'] = $topdomain;
}
return $this->api2_query($username, 'Park', 'park', $args);
}

Expand Down

0 comments on commit 93cb441

Please sign in to comment.